Re: [PATCH] Work around conflict between <{sys,linux}/ptrace.h>

2014-01-07 Thread Dmitry V. Levin
On Mon, Jan 06, 2014 at 08:59:58AM -0500, Mike Frysinger wrote: > On Tuesday 24 September 2013 13:04:32 Ali Polatel wrote: > > Since glibc 2.18 commit, > > http://www.sourceware.org/git/?p=glibc.git;a=commit;h=521c6785e1fc94d1f5017 > > 43e9a40af9e02797df3 defines ptrace_peeksiginfo_args which > >

Re: [PATCH] Add support for Altera's Nios-II softcore architecture

2014-01-27 Thread Dmitry V. Levin
Hi, On Mon, Jan 27, 2014 at 08:58:11PM -0200, Ezequiel García wrote: [...] > >> --- a/system.c > >> +++ b/system.c > >> > >> +int sys_getpagesize(struct tcb *tcp) > >> +{ > >> + return 0; > >> +} > > > > that can't possibly be correct ? > > Hm... why? The syscall receives no args and returns

Re: [PATCH] Add support to decode sockets descriptor 'paths' for network calls.

2014-01-30 Thread Dmitry V. Levin
On Thu, Jan 30, 2014 at 06:15:25PM +0100, Philippe Ombredanne wrote: > >From 159dcf882dc54d4f1e00c68087c216257f767a9c Thu, 30 Jan 2014 18:09:29 +0100 > From: pombredanne > Date: Thu, 30 Jan 2014 14:37:23 +0100 > Subject: [PATCH] Add support to decode sockets descriptor 'paths' for > network calls.

Re: [PATCH] net: add more sockopt options

2014-01-30 Thread Dmitry V. Levin
On Thu, Jan 30, 2014 at 06:53:43PM -0500, Mike Frysinger wrote: > This syncs with the defines as available in linux-3.13. Applied, thanks. Wouldn't it be better to keep these constants sorted the same way as they are sorted in uapi/linux/in.h? -- ldv pgpNFttcfwkAV.pgp Description: PGP signat

Re: [PATCH] net: add more sockopt options

2014-01-31 Thread Dmitry V. Levin
On Fri, Jan 31, 2014 at 01:27:14AM -0500, Mike Frysinger wrote: > > what would help i think with maintaining these files is a little macro that > > i use in other projects of mine: > > #define Q(x) { x, #x }, > > then the lists become: > > static const struct xlat domains[] = { > > Q(PF_UNS

Re: [PATCH] Add decoding of sockets descriptor 'paths' for network calls.

2014-01-31 Thread Dmitry V. Levin
On Fri, Jan 31, 2014 at 05:48:40AM -0800, Philippe Ombredanne wrote: [...] > @@ -339,11 +339,13 @@ pathtrace_match(struct tcb *tcp) > s->sys_func == sys_timerfd_settime || > s->sys_func == sys_timerfd_gettime || > s->sys_func == sys_epoll_create || > +s->sys_fu

Re: [PATCH] Decode dynamic posix clocks.

2014-01-31 Thread Dmitry V. Levin
On Fri, Jan 31, 2014 at 12:01:03PM +0100, Stefan Sørensen wrote: > +static void > +printclockname(int clockid) > +{ > +#ifdef CLOCKID_TO_FD > + if(clockid < 0) > + tprintf("CLOCKFD(%d)", CLOCKID_TO_FD(clockid)); I'm not sure this is quite correct: all (clockid & CLOCKFD_MASK) bits

Re: [PATCH] Add decoding of sockets descriptor 'paths' for network calls.

2014-02-02 Thread Dmitry V. Levin
On Sat, Feb 01, 2014 at 09:57:45AM -0800, Philippe Ombredanne wrote: > @@ -353,7 +355,7 @@ pathtrace_match(struct tcb *tcp) >* been handled is to just check arg[0]. >*/ > > - if (s->sys_flags & TRACE_FILE) > + if (s->sys_flags & (TRACE_FILE | TRACE_NETWORK)) >

Re: [PATCH v2] Decode dynamic posix clocks.

2014-02-04 Thread Dmitry V. Levin
On Mon, Feb 03, 2014 at 10:01:27AM +0100, Stefan Sørensen wrote: > * time.c (printclockname): New function that decodes posix clock > names, including dynamic fd encoded clocks. Replace clock name > printing with call to this. > > Signed-off-by: Stefan Sørensen > --- > Changes from v1: > * Also h

Re: [PATCH] Update ADJ_* constants

2014-02-04 Thread Dmitry V. Levin
On Fri, Jan 31, 2014 at 12:01:02PM +0100, Stefan Sørensen wrote: > * time.c (adjtimex_modes): Add ADJ_TAI, ADJ_SETOFFSET, ADJ_MICRO, > ADJ_NANO, ADJ_OFFSET_SS_READ. Applied, thanks. -- ldv pgpc6po2NNQ3L.pgp Description: PGP signature ---

Re: [PATCH] Decode ptp ioctls

2014-02-04 Thread Dmitry V. Levin
On Fri, Jan 31, 2014 at 12:01:01PM +0100, Stefan Sørensen wrote: > * defs.h (ptp_ioctl): New prototype. > * ioctl.c (ioctl_decode): Call ptp_ioctl when code is '='. > * Makefile.am (strace_SOURCES): Add ptp.c. > (EXTRA_DIST): Add linux/ptp_clock.h. > * ptp.c: New file. > * linux/ptp_clock.h: New fi

Re: [PATCH] Add support for Altera's Nios-II softcore architecture

2014-02-04 Thread Dmitry V. Levin
On Sun, Jan 26, 2014 at 09:59:07PM -0300, Ezequiel Garcia wrote: > +/* Nios-II specific compare and exchange syscall for atomic operations */ > +int sys_nios2cmpxchg(struct tcb *tcp) > +{ > + if (entering(tcp)) { > + tprintf(", 0x%lx, %#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1], > +

Re: [PATCH] Add support for Altera's Nios-II softcore architecture

2014-02-04 Thread Dmitry V. Levin
On Mon, Jan 27, 2014 at 07:42:48PM -0500, Mike Frysinger wrote: > On Monday, January 27, 2014 20:58:11 Ezequiel García wrote: [...] > > After talking to Arnd Bergmann, we might rework the whole syscall thing > > for this arch to implement the generic syscall ABI. > > > > Therefore, I'm not really

Re: Structured output?

2014-02-04 Thread Dmitry V. Levin
On Sun, Feb 02, 2014 at 09:39:35PM +0100, Philippe Ombredanne wrote: > Hi, > I was wondering if there could be something to make parsing of a > strace output a tad easier. > > In fact even though not too complex, parsing a strace output can be > almost as involved as the strace code that encodes t

Re: Google summer of code participation?

2014-02-04 Thread Dmitry V. Levin
On Tue, Feb 04, 2014 at 07:35:03PM +0100, Philippe Ombredanne wrote: > All: > Is there any interest in participating the Google Summer of code as an 'org'? > The benefit is to have one or a few select students working to propose > patches on strace for 3 months compensated by Google. > I am sure th

Re: [PATCH] net: add more sockopt options

2014-02-04 Thread Dmitry V. Levin
On Fri, Jan 31, 2014 at 01:27:14AM -0500, Mike Frysinger wrote: > On Thursday, January 30, 2014 22:13:29 Mike Frysinger wrote: > > On Friday, January 31, 2014 04:24:50 Dmitry V. Levin wrote: > > > On Thu, Jan 30, 2014 at 06:53:43PM -0500, Mike Frysinger wrote: > > > &g

Re: [PATCH] Add support for Altera's Nios-II softcore architecture

2014-02-04 Thread Dmitry V. Levin
On Wed, Feb 05, 2014 at 01:07:51AM -0200, Ezequiel García wrote: > On 4 February 2014 20:01, Dmitry V. Levin wrote: > > On Sun, Jan 26, 2014 at 09:59:07PM -0300, Ezequiel Garcia wrote: > >> +/* Nios-II specific compare and exchange syscall for atomic operations */ > >

Re: Google summer of code participation?

2014-02-06 Thread Dmitry V. Levin
On Thu, Feb 06, 2014 at 01:03:02AM +0100, Philippe Ombredanne wrote: > On Wed, Feb 5, 2014 at 2:01 AM, Dmitry V. Levin wrote: > > On Tue, Feb 04, 2014 at 07:35:03PM +0100, Philippe Ombredanne wrote: > >> All: > >> Is there any interest in participating the Google Summ

Re: Structured output?

2014-02-06 Thread Dmitry V. Levin
On Thu, Feb 06, 2014 at 03:41:54PM +0100, Philippe Ombredanne wrote: > On Wed, Feb 5, 2014 at 12:43 AM, Dmitry V. Levin wrote: [...] > > strace output format resembles C syntax. > > And yes, it's so old that it probably predates html. :) > > It does predate Linux too,

Re: Wiki page needed for GSOC projects ideas

2014-02-10 Thread Dmitry V. Levin
On Mon, Feb 10, 2014 at 01:58:18PM +0100, Philippe Ombredanne wrote: > Dmitry: > can you grant me edit/page creation access to the project wiki so I > can start a wiki page @ sf.net for the GSOC projects ideas? > My userid is pombredanne there I've made come changes in sf.net admin interface to th

Re: GSOC candidature draft for urgent feedback

2014-02-13 Thread Dmitry V. Levin
On Thu, Feb 13, 2014 at 07:03:16PM +0100, Philippe Ombredanne wrote: > While strace is a small project the strace tool is essential for many > developers and open source projects. Its maintainers and contributors > are experienced developers (contributors include Linux Torvalds among > many others)

Re: GSOC candidature draft for urgent feedback

2014-02-13 Thread Dmitry V. Levin
On Thu, Feb 13, 2014 at 07:03:16PM +0100, Philippe Ombredanne wrote: > 15. Are you a new organization who has a Googler or other organization > to vouch for you? If so, please list their name(s) here. I wonder should we ask Roland McGrath to vouch for this submission? ;) -- ldv pgpM1gGFbXebP.

Re: [PATCH v3] Add support for Altera's Nios-II softcore architecture

2014-02-14 Thread Dmitry V. Levin
On Fri, Feb 14, 2014 at 07:43:05PM -0200, Ezequiel García wrote: > On 6 February 2014 14:53, Ezequiel Garcia > wrote: > > This commit adds strace support for Altera's Nios-II official > > kernel port as found in: > > > > git://git.rocketboards.org/linux-socfpga.git > > > > Notice that this an o

Re: [PATCH] net: add more sockopt options

2014-02-16 Thread Dmitry V. Levin
On Sun, Feb 16, 2014 at 02:24:47AM -0500, Mike Frysinger wrote: > On Wednesday, February 05, 2014 06:40:05 Dmitry V. Levin wrote: [...] > > I've automatically converted most of xlat structures to this XLAT form. > > looks great. the ifdef stuff still annoys me. we

Re: [PATCH] net: add more sockopt options

2014-02-17 Thread Dmitry V. Levin
On Mon, Feb 17, 2014 at 03:18:44AM -0500, Mike Frysinger wrote: > On Monday, February 17, 2014 02:51:17 Dmitry V. Levin wrote: [...] > > > + echo "const struct xlat ${name}[] = {" > > > > static? > > i started with that, but not all xlat's are stat

Re: [PATCH] net: add more sockopt options

2014-02-17 Thread Dmitry V. Levin
On Mon, Feb 17, 2014 at 03:18:44AM -0500, Mike Frysinger wrote: [...] > how do you feel about using python in the build system ? > it wouldn't impact the released tarball, just maintainers. I'd rather delay this until we faced with a task of such complexity that would make our traditional instrume

Re: [PATCH] powerpc64/linux: Fix 64-bit process detection on embedded

2014-02-19 Thread Dmitry V. Levin
On Tue, Feb 18, 2014 at 03:32:43PM -0600, James Yang wrote: > * syscall.c: Fix 64-bit process detection on embedded powerpc > > Signed-off-by: James Yang > --- > syscall.c |5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/syscall.c b/syscall.c > index 3477dcd..8d

Re: output overwritten with the -ff option when the pid rolls over the pix_max (and you have many processes)

2014-02-20 Thread Dmitry V. Levin
On Thu, Feb 20, 2014 at 04:35:02PM +0100, Philippe Ombredanne wrote: > This is a bug that can happen rarely, but is easy to reproduce. > If you trace forks with -ff and -o and you have more processes created > than the maximum number of pids, eventually the saved traces of some > pids will be overw

Re: Fwd: [strace] Your organization application has been accepted.

2014-02-24 Thread Dmitry V. Levin
On Mon, Feb 24, 2014 at 09:53:59PM +0100, Philippe Ombredanne wrote: > FYI, strace has been accepted as a GSOC project. > http://www.google-melange.com/gsoc/org2/google/gsoc2014/strace > > I updated https://sourceforge.net/p/strace/wiki/GoogleSummerOfCode2014/ Good news, thanks! -- ldv pgp_t

Re: [PATCH] powerpc64/linux: Fix 64-bit process detection on embedded

2014-02-25 Thread Dmitry V. Levin
On Wed, Feb 19, 2014 at 07:10:53PM -0600, James Yang wrote: > On Thu, 20 Feb 2014, Dmitry V. Levin wrote: > > > On Tue, Feb 18, 2014 at 03:32:43PM -0600, James Yang wrote: > > > * syscall.c: Fix 64-bit process detection on embedded powerpc > > > &

Re: [PATCH] powerpc64/linux: Fix 64-bit process detection on embedded

2014-02-25 Thread Dmitry V. Levin
On Tue, Feb 25, 2014 at 05:19:57PM -0600, James Yang wrote: > On Tue, 25 Feb 2014, Dmitry V. Levin wrote: > > On Wed, Feb 19, 2014 at 07:10:53PM -0600, James Yang wrote: > > > On Thu, 20 Feb 2014, Dmitry V. Levin wrote: > > > > On Tue, Feb 18, 2014 at 03:3

Re: porting strace to Bionic libc (was: GSOC candidature draft for urgent feedback)

2014-02-25 Thread Dmitry V. Levin
On Tue, Feb 25, 2014 at 11:49:30AM -0800, enh wrote: [...] > one reason we've lagged behind upstream in the past is that we've > needed a lot of local hacks. some bionic's fault, some strace's. as > part of the recent upgrade i fixed the stuff that was bionic's fault, > and it looks like you've alr

Re: Advanced and improved absolute paths decoding

2014-02-25 Thread Dmitry V. Levin
Hi, On Tue, Feb 25, 2014 at 10:27:37PM +0530, Zubin Mithra wrote: > Hey all, > > I'm Zubin and I love low level systems programming! :) Great! :) > A little about myself, I program primarily in C and Python, have systems > programming experience with Minix(filesystem development) and Linux and

Re: strace of arm binaries on arm64

2014-02-26 Thread Dmitry V. Levin
On Wed, Feb 26, 2014 at 02:01:51PM -0800, enh wrote: > i notice that the decoding of sigaltstack's struct stack_t is wrong on > arm64 for a 32-bit process. looking at print_stack_t in strace, i > don't understand how this works for x86/x86_64 --- the first field is > a void*. so i'm a bit confused

[PATCH] Rewrite signal mask decoding without sigset_t

2014-02-26 Thread Dmitry V. Levin
The sigset_t provided by libc is not quite convenient. In glibc, sigset_t is an array with space for 1024 bits, which is much more than required: all architectures supported by Linux have only 64 signals except MIPS, which has 128. In bionic libc, LP32 sigset_t is only 4 bytes long, which is less t

Re: porting strace to Bionic libc

2014-02-26 Thread Dmitry V. Levin
On Tue, Feb 25, 2014 at 06:14:30PM -0800, enh wrote: > with the appropriate additions to our makefile, your tip of tree works > perfectly without patches except: > > In file included from bionic/libc/include/signal.h:35:0, > from bionic/libc/include/sys/select.h:35, >

Re: GSOC 2014

2014-02-27 Thread Dmitry V. Levin
Hi, On Wed, Feb 26, 2014 at 12:02:09PM +0530, Rohan Saxena wrote: > Hi Everyone > > I am Rohan Saxena. Currently I am pursuing my B.E.(Hons) in computer > science from BITS Pilani India. I am deeply interested in system > programming and want to contribute to strace as part of GSOC 2014. > > Can

Re: porting strace to Bionic libc

2014-02-27 Thread Dmitry V. Levin
On Thu, Feb 27, 2014 at 11:06:09AM -0800, enh wrote: > On Wed, Feb 26, 2014 at 3:42 PM, Dmitry V. Levin wrote: > > I've posted a patch that reimplements signal mask decoding without use of > > sigset_t. It fixes this issue, but may introduce new bugs. Please check >

Re: [PATCH] Rewrite signal mask decoding without sigset_t

2014-02-27 Thread Dmitry V. Levin
On Thu, Feb 27, 2014 at 11:51:19PM +0100, Andreas Schwab wrote: > "Dmitry V. Levin" writes: > > > Tested on x86, x86-64 and arm. Please test on other architectures, > > especially on big-endian, I'm not sure I haven't broken some of them. > > At

Re: ioctlsort.c

2014-02-28 Thread Dmitry V. Levin
On Thu, Feb 27, 2014 at 06:47:58PM -0800, enh wrote: > why is there an ioctlsort.c and a linux/ioctlsort.c? should > ioctlsort.c be removed? Yes, ioctlsort.c is a generic version, it had to be removed along with commit v4.6-240-g5afdf12, thanks for reporting. -- ldv pgpPI_JVft50D.pgp Descript

Re: porting strace to Bionic libc

2014-02-28 Thread Dmitry V. Levin
On Thu, Feb 27, 2014 at 04:52:01PM -0800, enh wrote: > this fixes decoding of struct sigaction for arm32 binaries traced by > an arm64 strace for me. arm32-arm32 and arm64-arm64 continue to work. Thanks. Could you also write a commit message for this patch, please? -- ldv pgpy9MwA6B6Aq.pgp D

Re: porting strace to Bionic libc

2014-02-28 Thread Dmitry V. Levin
On Fri, Feb 28, 2014 at 03:06:36PM -0800, enh wrote: > this okay? Yes, thank you. The patch introducing old_sigaction32 also needs a commit message. :) -- ldv pgppn1_nf05y2.pgp Description: PGP signature -- Flow-base

Re: porting strace to Bionic libc

2014-02-28 Thread Dmitry V. Levin
On Fri, Feb 28, 2014 at 03:28:19PM -0800, enh wrote: > Add multi-personality support to struct old_sigaction decoding > > struct sigaction is another structure that contains members > whose size differs between 32-bit and 64-bit personalities. Applied both patches, thanks! -- ldv pgpoOoZ1eR0

Re: Advanced and improved absolute paths decoding

2014-03-02 Thread Dmitry V. Levin
On Sun, Mar 02, 2014 at 11:54:57AM +0100, Philippe Ombredanne wrote: > On Wed, Feb 26, 2014 at 2:28 AM, Dmitry V. Levin wrote: > > > Fourth, I think -yy should also "canonicalize" socket descriptors, i.e. > > print their addresses in <> form, resembling ls

Re: GSOC: Structured output

2014-03-02 Thread Dmitry V. Levin
On Sun, Mar 02, 2014 at 02:38:16PM +0300, Dennis Borisevich wrote: > Hello. > My name is Denis Borisevich. I am a Belarusian State University > second-year student and I wish to participate in this year's Google > Summer of Code. I am a fan of Unix-like systems and pure C programming. > > I like t

Re: Advanced and improved absolute paths decoding

2014-03-02 Thread Dmitry V. Levin
On Sun, Mar 02, 2014 at 01:18:57PM +0100, Philippe Ombredanne wrote: > On Sun, Mar 2, 2014 at 12:44 PM, Dmitry V. Levin wrote: [...] > > The exact output format may vary, but the general idea of strace decoding > > is to mimic C syntax. From this PoV, path names should always be

Re: Advanced and improved absolute paths decoding

2014-03-03 Thread Dmitry V. Levin
On Mon, Mar 03, 2014 at 10:52:48AM +0530, Zubin Mithra wrote: > >> I believe that the first step would be to document and note down the system > >> calls that belong to one or more of the above categories and their system > >> call numbers, and if the -yy flag is used, check the tcp->scno against >

Re: [PATCH] decoding arm syscalls on arm64

2014-03-03 Thread Dmitry V. Levin
On Mon, Mar 03, 2014 at 01:24:07PM -0800, enh wrote: > Fix decoding of arm syscall numbers by aarch64 strace. > > If an aarch64 strace is tracing a process using the arm personality, it also > needs to call the shuffle_scno function for the ARM-specific syscalls. Applied, thanks. -- ldv pgpK

Re: [PATCH] Add (incomplete) decoder for Video4Linux ioctls

2014-03-07 Thread Dmitry V. Levin
On Thu, Mar 06, 2014 at 11:51:02PM +, William Manley wrote: > On 04/03/14 17:41, William Manley wrote: > > + case VIDIOC_TRY_FMT: > > + case VIDIOC_S_FMT: > > + { > > + /* TODO: work out how strace deals with inout arguments > > and > > +

Re: [PATCH] Add (incomplete) decoder for Video4Linux ioctls

2014-03-10 Thread Dmitry V. Levin
On Tue, Mar 04, 2014 at 05:41:27PM +, William Manley wrote: > --- > Makefile.am | 1 + > defs.h | 1 + > ioctl.c | 2 + > v4l2.c | 529 > > 4 files changed, 533 insertions(+) > create mode 100644 v4l2.c I canno

Re: improved SI_TIMER decoding

2014-03-10 Thread Dmitry V. Levin
On Mon, Mar 10, 2014 at 09:21:19PM -0400, Mike Frysinger wrote: > On Mon 10 Mar 2014 17:40:17 enh wrote: > > i think we might be talking at cross purposes. the pid/uid stuff that > > > isn't relevant for SI_TIMER isn't in sigval_t; it's in siginfo_t. i > > did factor out the sigval_t stuff. > > y

Re: [PATCH] Decode protocol arg for netlink socket

2014-03-11 Thread Dmitry V. Levin
On Tue, Mar 11, 2014 at 11:37:37PM +0900, Masatake YAMATO wrote: > @@ -2059,7 +2134,7 @@ sys_socketpair(struct tcb *tcp) > tprints(", "); > switch (tcp->u_arg[0]) { > case PF_INET: > - printxval(protocols, tcp->u_arg[2], "IPPROTO_???");

Re: [PATCH] Fix stat decoding for LP64 bionic.

2014-03-12 Thread Dmitry V. Levin
On Wed, Mar 12, 2014 at 10:41:42AM -0700, enh wrote: [...] > In patch fb642bb6d63f7ffe2228bf48a6008bc8f56f67ff I fixed aarch64 but broke > x86_64. No code added under #ifdef AARCH64 can ever break x86_64. > The workaround needed to be applied to all LP64 architectures, not > just aarch64. This pa

Re: [PATCH] Fix stat decoding for LP64 bionic.

2014-03-12 Thread Dmitry V. Levin
On Wed, Mar 12, 2014 at 01:44:06PM -0700, enh wrote: > On Wed, Mar 12, 2014 at 1:36 PM, Dmitry V. Levin wrote: > > On Wed, Mar 12, 2014 at 10:41:42AM -0700, enh wrote: > > [...] > >> In patch fb642bb6d63f7ffe2228bf48a6008bc8f56f67ff I fixed aarch64 but broke > >&

Re: [PATCH] Decode setsockopt() multicast arguments

2014-03-18 Thread Dmitry V. Levin
On Mon, Mar 17, 2014 at 07:24:00PM +0100, Ben Noordhuis wrote: > * net.c (sys_setsockopt): decode IP_ADD_MEMBERSHIP, IP_DROP_MEMBERSHIP, > IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP arguments. Thanks. > --- a/net.c > +++ b/net.c > @@ -2301,6 +2301,49 @@ static void printicmpfilter(struct tcb

Q: OABI support for ARM EABI

2014-03-19 Thread Dmitry V. Levin
Hi, strace on ARM EABI currently implements limited OABI support. This feature is enabled by default, and it costs extra PTRACE_PEEKTEXT on every syscall. I wonder whether OABI is used on some ARM EABI systems nowadays? Wouldn't it be better to disable this feature by default? -- ldv pgpwr3G

Re: Advanced and improved absolute paths decoding

2014-03-19 Thread Dmitry V. Levin
Hi, On Tue, Mar 18, 2014 at 09:20:25PM +0530, Zubin Mithra wrote: > Hey everyone, > > Based on the valuable discussion above, I've written out a first draft > of the proposal for the ideas related to path decoding and structured > output. > > Please find the initial draft here[1] -- any opinions

Re: Q: OABI support for ARM EABI

2014-03-20 Thread Dmitry V. Levin
On Thu, Mar 20, 2014 at 01:59:05AM -0400, Mike Frysinger wrote: > On Thu 20 Mar 2014 01:51:30 Dmitry V. Levin wrote: > > strace on ARM EABI currently implements limited OABI support. > > This feature is enabled by default, and it costs extra PTRACE_PEEKTEXT on > > every sysca

Re: Experience from writing trace_inputs.py

2014-03-21 Thread Dmitry V. Levin
On Fri, Mar 21, 2014 at 10:49:55AM -0400, Marc-Antoine Ruel wrote: [...] > Yes I'm on 4.5.20. I mildly recall hitting problems when trying to > compile strace's tip of tree since I think (?) it required a newer gcc > version than the stock one (4.6.3) in 12.04. That was in 2012. At that > point, I

preparing for the next release

2014-04-02 Thread Dmitry V. Levin
Hi, There is quite enough good stuff accumulated in strace.git since v4.8 to release a new version. If you have pending patches to include before the release, please submit them. -- ldv pgpMzipCwSChU.pgp Description: PGP signature -

Re: strace of all the process running in the system

2014-04-03 Thread Dmitry V. Levin
On Sun, Mar 30, 2014 at 11:44:56PM -0700, Philippe Ombredanne wrote: [...] > Since you can attach to up to 32 process per strace launch (using -p > multiple times) This artificial limit was lifted by commit v4.4.90~49, so you can pass -p option as many times as execve syscall allows. The manpage

Re: strace: epoll_ctl

2014-04-05 Thread Dmitry V. Levin
On Sat, Apr 05, 2014 at 07:58:39PM +0600, Марк Коренберг wrote: > The fd argument of epoll_ctl should be signed integer. it seems that > strace decodes it as unsigned. It was fixed by commit v4.6~11 (3 years and 1 month ago). Next time please check the latest release (or HEAD) before reporting bu

Re: [PATCH] Fix aarch64 decoding of arm struct stat64.

2014-04-06 Thread Dmitry V. Levin
> diff --git a/file.c b/file.c > index 7e0773d..b2790e0 100644 > --- a/file.c > +++ b/file.c > @@ -181,10 +181,6 @@ struct __old_kernel_stat { > #undef st_mtime > #undef st_ctime > > -#ifdef AARCH64 > -#define stat64 stat > -#endif /* AARCH64 */ > - > #include > #ifdef HAVE_SYS_VFS_H > # inc

Re: [PATCH] Fix aarch64 decoding of arm struct stat64.

2014-04-09 Thread Dmitry V. Levin
On Sun, Apr 06, 2014 at 12:15:57PM -0700, enh wrote: > On Sun, Apr 6, 2014 at 8:20 AM, Dmitry V. Levin wrote: > >> diff --git a/file.c b/file.c > >> index 7e0773d..b2790e0 100644 > >> --- a/file.c > >> +++ b/file.c > >> @@ -181,10 +181,6 @@

Re: strace sys_clone bug on x86-32

2014-04-09 Thread Dmitry V. Levin
On Sun, Apr 06, 2014 at 12:41:17PM -0700, enh wrote: > Fix clone(2) argument order for 32-bit processes on x86-64. [...] > if you want to get fancy, you can also decode the LDT user_desc > entries (like you would if you were using an x86 strace to trace an > x86 process): Thanks, applied both

Re: preparing for the next release

2014-04-09 Thread Dmitry V. Levin
Hi Luca, On Wed, Apr 09, 2014 at 07:35:25AM -0700, Luca Clementi wrote: > On Wed, Apr 2, 2014 at 9:12 AM, Dmitry V. Levin wrote: > > > There is quite enough good stuff accumulated in strace.git since v4.8 > > to release a new version. If you have pending patches to incl

Re: strace sys_clone bug on x86-32

2014-04-10 Thread Dmitry V. Levin
On Wed, Apr 09, 2014 at 06:19:20PM -0700, enh wrote: > i don't think > > commit f94e84780e96221a4b3e8eb39bfa2d227d367f69 [...] > builds for I386, because there's a dangling 'else'. Indeed, thanks for reporting. I should have spotted it myself, though. > that's why my > version had the "int prin

Re: [PATCH 01/25] ldv/unwind: improve stacktrace feature(v3)

2014-04-10 Thread Dmitry V. Levin
On Sun, Nov 10, 2013 at 03:41:57PM +0900, Masatake YAMATO wrote: > Based on the discussion on strace-devel, I improved following points: Masatake, your patch contains several different changes and therefore is not easy to follow. This is probably the reason why I failed to review it in November.

Re: [PATCH 2/4] ldv/unwind: handle invalid pid

2014-04-10 Thread Dmitry V. Levin
On Thu, Apr 10, 2014 at 01:52:09AM +0900, Masatake YAMATO wrote: > In unwind part of tcb finalization, tcp->s_ent > was accessed to decide whether pending stacktrace in tcp->queue > should be printed or not. > > However, s_ent can be NULL if invalid pid is given to strace > as an trace target. Her

Re: [PATCH 3/4] ldv/unwind: handle deleted file when building map cache

2014-04-10 Thread Dmitry V. Levin
On Thu, Apr 10, 2014 at 01:52:11AM +0900, Masatake YAMATO wrote: > Signed-off-by: Masatake YAMATO > --- > unwind.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/unwind.c b/unwind.c > index a7e985e..0f9f79d 100644 > --- a/unwind.c > +++ b/unwind.c > @@ -130,6 +130,7 @@ build_mmap

Re: Incorrect preadv/pwritev argument parsing on ARM EABI

2014-04-16 Thread Dmitry V. Levin
On Wed, Apr 16, 2014 at 02:28:40AM -0700, Dima Kogan wrote: > Dima Kogan writes: > > Dima Kogan writes: > > > >> Does anybody know what's going on? I can imagine anything from the > >> kernel being inconsistent with itself to glibc producing an incorrect > >> kernel interface. > > > > So I just c

Re: multi-arch testing plan

2014-04-16 Thread Dmitry V. Levin
On Wed, Apr 16, 2014 at 09:11:28AM -0700, enh wrote: > is there a plan for improving testing? especially for multiple > architectures and multiple personalities? There was a promising idea by Mike Frysinger to reuse a framework: http://sourceforge.net/p/strace/mailman/strace-devel/thread/201305081

Re: epoll_ctl(EPOLL_CTL_DEL) parses event structure

2014-04-16 Thread Dmitry V. Levin
On Mon, Apr 14, 2014 at 08:28:52PM +0600, Марк Коренберг wrote: > epoll_ctl(EPOLL_CTL_DEL) parses event structure. It shuold not. I agree. :) > It will be nice if inthat case, strace print "NULL" or "NOT NULL" in this > argument. Real value under this pointer is not meaningful (just trash). stra

Re: [PATCH v4 07/37] unwind: introduce unwind.c own debug macro

2014-04-16 Thread Dmitry V. Levin
On Wed, Apr 16, 2014 at 03:33:05PM +0900, Masatake YAMATO wrote: > Introduce unwind.c own debug macro to be utilized > in debugging the code of cache management. > > Signed-off-by: Masatake YAMATO > --- > unwind.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/unwind.c b/unwind.c >

Re: Incorrect preadv/pwritev argument parsing on ARM EABI

2014-04-17 Thread Dmitry V. Levin
On Wed, Apr 16, 2014 at 11:19:06PM -0700, Dima Kogan wrote: > Dima Kogan writes: > > Dmitry V. Levin writes: > > > >> Unfortunately, your patch breaks all 64-bit architectures because offset > >> is passed as a single argument > > > > Oh yeah. I cle

Re: Incorrect preadv/pwritev argument parsing on ARM EABI

2014-04-17 Thread Dmitry V. Levin
On Thu, Apr 17, 2014 at 02:16:31AM -0700, Dima Kogan wrote: > Dmitry V. Levin writes: > > > On Wed, Apr 16, 2014 at 11:19:06PM -0700, Dima Kogan wrote: > >> Dima Kogan writes: > >> > Dmitry V. Levin writes: > >> > > >> OK. Never mind on

Re: Incorrect preadv/pwritev argument parsing on ARM EABI

2014-04-17 Thread Dmitry V. Levin
On Thu, Apr 17, 2014 at 01:03:31PM +0400, Dmitry V. Levin wrote: > On Wed, Apr 16, 2014 at 11:19:06PM -0700, Dima Kogan wrote: > > Dima Kogan writes: > > > Dmitry V. Levin writes: > > > > > >> Unfortunately, your patch breaks all 64-bit architectures beca

Re: epoll_ctl(EPOLL_CTL_DEL) parses event structure

2014-04-17 Thread Dmitry V. Levin
On Thu, Apr 17, 2014 at 04:50:13AM +0400, Dmitry V. Levin wrote: > On Mon, Apr 14, 2014 at 08:28:52PM +0600, Марк Коренберг wrote: > > epoll_ctl(EPOLL_CTL_DEL) parses event structure. It shuold not. > > I agree. :) > > > It will be nice if inthat case, strace print &quo

Re: [PATCH] generate xlat structs

2014-04-17 Thread Dmitry V. Levin
On Mon, Feb 17, 2014 at 07:08:52PM +0400, Dmitry V. Levin wrote: > On Mon, Feb 17, 2014 at 03:18:44AM -0500, Mike Frysinger wrote: > > On Monday, February 17, 2014 02:51:17 Dmitry V. Levin wrote: > [...] > > > > + echo "const struct xlat ${name}[] = {" >

Re: [PATCH] generate xlat structs

2014-04-26 Thread Dmitry V. Levin
On Fri, Apr 18, 2014 at 02:46:25AM +0400, Dmitry V. Levin wrote: > On Mon, Feb 17, 2014 at 07:08:52PM +0400, Dmitry V. Levin wrote: > > On Mon, Feb 17, 2014 at 03:18:44AM -0500, Mike Frysinger wrote: > > > On Monday, February 17, 2014 02:51:17 Dmitry V. Levin wrote: > > [.

Re: Using "-c" and CTRL+C

2014-05-08 Thread Dmitry V. Levin
Hi, On Wed, May 07, 2014 at 04:54:40PM +0200, Bud Millwood wrote: > Hi all, I'm not on this list but I'll keep an eye out for a response > to this message. > > In the past I noticed that if I ran "strace -c" against a process, I > could press CTRL-C and strace would print out the statistics it ha

Re: Using "-c" and CTRL+C

2014-05-12 Thread Dmitry V. Levin
On Fri, May 09, 2014 at 12:42:02PM +0200, Bud Millwood wrote: > I think I've located my problem - it's a question of choosing the right > pid. I'm debugging a multi-threaded application, and "ps" doesn't show the > pid for each thread, whereas htop does. Choosing the pid of a specific > thread caus

Re: Using "-c" and CTRL+C

2014-05-13 Thread Dmitry V. Levin
On Fri, May 09, 2014 at 12:42:02PM +0200, Bud Millwood wrote: > I think I've located my problem - it's a question of choosing the right > pid. I'm debugging a multi-threaded application, and "ps" doesn't show the > pid for each thread, whereas htop does. Choosing the pid of a specific > thread caus

Re: [PATCH] sys_setns: decode nstype, the second argument

2014-05-13 Thread Dmitry V. Levin
On Wed, May 14, 2014 at 01:46:04AM +0900, Masatake YAMATO wrote: > * process.c (sys_setns): New function. Use `clone_flags' > to decode the seconde argument. > * linux/dummy.h (sys_setns): Remove the macro. Applied, thanks. A prototype for this new function had to be added to linux/syscall.h al

Re: [PATCH v4 00/37] ldv/unwind: improve stacktrace feature

2014-05-13 Thread Dmitry V. Levin
On Wed, Apr 16, 2014 at 03:32:58PM +0900, Masatake YAMATO wrote: > This patch set is for improving stacktrace feature. > The review result of Dmitry V. Levin are > reflected. > > You can try the patch incremental. About any n (0 < n < 38), you can > apply patches from 1

Re: [PATCH] Fix {get, set}rlimit decoding with unreliable SIZEOF_RLIM_T

2014-05-14 Thread Dmitry V. Levin
Hi, On Fri, May 02, 2014 at 02:15:41PM +0100, James Hogan wrote: > When strace is built with large file support definitions in CFLAGS (as > may be provided by buildroot) the C library headers may expose a 64-bit > rlim_t even though the struct rlimit fields used by the system call > interface are

Q: strace logo

2014-05-14 Thread Dmitry V. Levin
Hi, As strace project is participating in GSoC for the first time, Google is asking us for a logo. I suppose we haven't got a logo yet. Maybe it's time to get one? :) Is anybody aware of any picture that could be used as a strace logo? -- ldv pgphWzX1I5Ptl.pgp Description: PGP signature

Re: [PATCH] unwind: add simple test case for testing -k

2014-05-14 Thread Dmitry V. Levin
On Wed, May 14, 2014 at 01:16:29PM +0900, Masatake YAMATO wrote: [...] > diff --git a/tests/stack-fcall.c b/tests/stack-fcall.c > new file mode 100644 > index 000..3e6ffd4 > --- /dev/null > +++ b/tests/stack-fcall.c > @@ -0,0 +1,27 @@ > +#include > +#include > + > +/* volatile is used to prot

Re: [PATCH] Fix {get, set}rlimit decoding with unreliable SIZEOF_RLIM_T

2014-05-16 Thread Dmitry V. Levin
On Fri, May 16, 2014 at 12:53:29PM +0100, James Hogan wrote: > On 14/05/14 15:17, Dmitry V. Levin wrote: [...] > > I have two questions wrt this patch: > > > > 1. Removing the conditional would result with print_rlimit32 defined for > > all architectures, including pur

Re: [PATCH] Fix {get, set}rlimit decoding with unreliable SIZEOF_RLIM_T

2014-05-20 Thread Dmitry V. Levin
On Tue, May 20, 2014 at 11:24:51PM +0100, James Hogan wrote: > Hi Dmitry, > > On 16/05/14 17:02, Dmitry V. Levin wrote: > > On Fri, May 16, 2014 at 12:53:29PM +0100, James Hogan wrote: > >> On 14/05/14 15:17, Dmitry V. Levin wrote: > > [...] > >&g

Re: Undefined behavior in decode_select

2014-05-22 Thread Dmitry V. Levin
On Fri, May 23, 2014 at 02:11:54AM +0200, Robert Święcki wrote: > Hi, > > strace will behave in an undefined way (crash under current glibc), if the > fd argument to FD_ISSET() macro is >= FD_SETSIZE. It was fixed by commit v4.8-72-gc2982b5. Thanks for reporting. :) -- ldv pgpHYCHzti_9a.pgp

Re: System calls that return file descriptors

2014-05-22 Thread Dmitry V. Levin
On Thu, May 22, 2014 at 08:45:44PM +0530, Zubin Mithra wrote: > I've restructured it a bit more, added in dup* calls, please see commit at > [1] and sample output at [2]. > > [1] > https://github.com/eQu1NoX/strace/commit/3d471ba8fccc531b8bc33b6467644b2d17ba8cc0 > [2] https://gist.github.com/eQu1N

Re: System calls that return file descriptors

2014-05-22 Thread Dmitry V. Levin
On Thu, May 22, 2014 at 07:15:39PM +0530, Zubin Mithra wrote: > On Thu, May 22, 2014 at 7:12 PM, Fiedler Roman wrote: > > > > Von: Zubin Mithra [mailto:zubin.mit...@gmail.com] > > > > > > Hey everyone, > > > > > > I just had a look around for system calls that return file descriptors > > on a > >

Re: [PATCH] Path decoding of file descriptors returned from system calls

2014-05-25 Thread Dmitry V. Levin
Hi, On Sun, May 25, 2014 at 11:19:43PM +0530, Zubin Mithra wrote: > >From 6f7e5475f360ce8155f82cd5389f67c619ca7bed Mon Sep 17 00:00:00 2001 > From: eQuiNoX__ > Date: Wed, 21 May 2014 18:19:01 +0530 > Subject: [PATCH] Path decoding for system calls that return file descriptors > implemented. > >

Re: [PATCH] Path decoding for system calls that return file descriptors implemented.

2014-05-26 Thread Dmitry V. Levin
Hi Zubin, On Mon, May 26, 2014 at 10:18:11PM +0530, zubin.mit...@gmail.com wrote: > From: eQuiNoX__ Could you choose one of your names for use in git commits and stick with it, at least for the length of this GSoC, please? This could be done e.g. by setting user.name and user.email with git-con

Re: [PATCH] Path decoding for system calls that return file descriptors implemented.

2014-05-27 Thread Dmitry V. Levin
On Tue, May 27, 2014 at 06:32:29AM +0530, Zubin Mithra wrote: > >> --- a/syscall.c > >> +++ b/syscall.c > >> @@ -2669,7 +2669,12 @@ trace_syscall_exiting(struct tcb *tcp) > >> tprintf("= %lu", tcp->u_rval); > >> break; > >>

Re: [PATCH RFC] Summary of syscall latency

2014-05-27 Thread Dmitry V. Levin
On Tue, May 20, 2014 at 10:26:11AM +0100, Mark Hills wrote: > Time spent in system time is not useful where a syscall depends on some > non-CPU resource, eg. typically open() or stat() to a network drive. > > This patch adds a -w flag to produce a summary of the time difference > between beginni

Re: [PATCH] Path decoding for system calls that return file descriptors implemented.

2014-05-28 Thread Dmitry V. Levin
On Tue, May 27, 2014 at 06:32:29AM +0530, Zubin Mithra wrote: > On Tue, May 27, 2014 at 4:53 AM, Dmitry V. Levin wrote: > > On Mon, May 26, 2014 at 10:18:11PM +0530, zubin.mit...@gmail.com wrote: [...] > >> * Type of `show_fd_path` changed from `bool` to `unsigned int` to >

Re: [PATCH RFC] Summary of syscall latency

2014-05-28 Thread Dmitry V. Levin
On Tue, May 27, 2014 at 05:44:35PM +0100, Mark Hills wrote: > On Tue, 27 May 2014, Dmitry V. Levin wrote: > > > On Tue, May 20, 2014 at 10:26:11AM +0100, Mark Hills wrote: > > > Time spent in system time is not useful where a syscall depends on some > > > non-CP

Re: Pathnames followed by "..." when printed using printpathn

2014-05-28 Thread Dmitry V. Levin
On Tue, May 27, 2014 at 09:23:15AM +0530, Zubin Mithra wrote: > Hello everyone, > > Currently I'm working on a means by which I can convert relative paths to > absolute when displayed as system call arguments. Some sample output can be > seen here[1]. Please note that the arguments passed to "exec

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