Re: preparing to 4.5.19 release

2009-10-07 Thread Mike Frysinger
On Wednesday 07 October 2009 22:03:14 Roland McGrath wrote:
> > Another small issue is file timestamps in release tarball.
> > Since git does not store timestamps, all files will have current mtime
> > after checkout, while we still package files with last modification in
> > previous century (e.g. PORTING).
> 
> I honestly just don't see any problem there.  Nobody cares what the
> timestamps are, as long as configure is newer than configure.ac and that
> sort of thing (not that they should complain anyway if they decided to use
> --enable-maintainer-mode).

as you say, as long as the autotool timestamps are in sync (and thus cause 
them to re-run), it shouldnt matter.  only other timestamp issue i can think 
of is having a file that is really really old and ends up making tar whine 
about it when unpacking.

> > There is a script, git-set-file-times, which could be called right after
> > checkout to set mtime and atime of files to their latest commit time in
> > git:
> > http://gitweb.samba.org/?p=rsync.git;a=blob_plain;f=support/git-set-file-
> >times
> >
> > I suggest to use it for preparing release tarball.
> 
> What I've always used is just 'make distcheck' (and now 'make srpm'), just
> based on my own checkout with whatever working file state it has (making
> sure manually that it's a clean checkout of the tagged state, of course).
> I can't tell if you are suggesting some new automation, or just encouraging
> that whoever does 'make distcheck' runs this thing on their working tree
> first.  Since I'm looking to get out of being the one who does that step in
> future cycles, it's not really my reaction that matters.

i hope `make distcheck` is kept in working order as it's the preferred way of 
packaging autotooled projects.
-mike


signature.asc
Description: This is a digitally signed message part.
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: preparing to 4.5.19 release

2009-10-07 Thread Roland McGrath
> Mike Frysinger already submitted a fix for this issue, I'm going to check
> it on x86 and x86-64, and merge it if everything is OK.

Ok.

> Another small issue is file timestamps in release tarball.
> Since git does not store timestamps, all files will have current mtime
> after checkout, while we still package files with last modification in
> previous century (e.g. PORTING).

I honestly just don't see any problem there.  Nobody cares what the
timestamps are, as long as configure is newer than configure.ac and that
sort of thing (not that they should complain anyway if they decided to use
--enable-maintainer-mode).

> There is a script, git-set-file-times, which could be called right after
> checkout to set mtime and atime of files to their latest commit time in git:
> http://gitweb.samba.org/?p=rsync.git;a=blob_plain;f=support/git-set-file-times
> 
> I suggest to use it for preparing release tarball.

What I've always used is just 'make distcheck' (and now 'make srpm'), just
based on my own checkout with whatever working file state it has (making
sure manually that it's a clean checkout of the tagged state, of course).
I can't tell if you are suggesting some new automation, or just encouraging
that whoever does 'make distcheck' runs this thing on their working tree
first.  Since I'm looking to get out of being the one who does that step in
future cycles, it's not really my reaction that matters.


Thanks,
Roland

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


[PATCH v2] avoid malloc(0) in getdents

2009-10-07 Thread Mike Frysinger
When getdents finishes processing, it returns 0.  Strace uses this to then
try and do malloc(0), but on some systems this will always return NULL.
Since the code won't read the pointer in question if len is 0, then don't
bother calling malloc() and set the pointer to NULL our self.

* file.c (sys_getdents, sys_getdents64): Ignore malloc(0) == NULL.

Signed-off-by: Mike Frysinger 
---
v2
- revised code based on feedback from Dmitry

 file.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/file.c b/file.c
index c6e3b52..4a2512f 100644
--- a/file.c
+++ b/file.c
@@ -2337,7 +2337,8 @@ sys_getdents(struct tcb *tcp)
return 0;
}
len = tcp->u_rval;
-   if ((buf = malloc(len)) == NULL) {
+   buf = len ? malloc(len) : NULL;
+   if (len && !buf) {
tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
fprintf(stderr, "out of memory\n");
return 0;
@@ -2420,7 +2421,8 @@ sys_getdents64(struct tcb *tcp)
return 0;
}
len = tcp->u_rval;
-   if ((buf = malloc(len)) == NULL) {
+   buf = len ? malloc(len) : NULL;
+   if (len && !buf) {
tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
fprintf(stderr, "out of memory\n");
return 0;
-- 
1.6.5.rc2


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


[PATCH v4] Add support for Linux/no-mmu with vfork

2009-10-07 Thread Mike Frysinger
* configure.ac (AC_CHECK_FUNCS): Add fork.
* strace.c (strace_fork): Define.
(startup_child): Do not SIGSTOP if vforked.
(trace): Skip first exec when starting up after vforked.
* syscall.c (get_scno): Drop Blackfin waitexec checks.

Signed-off-by: Mike Frysinger 
---
v4
- drop dynamic fork()==ENOSYS detection

 configure.ac |1 +
 strace.c |   17 +++--
 syscall.c|3 ---
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 95f769e..7b1a8c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,6 +209,7 @@ AC_CHECK_LIB(nsl, main)
 fi
 
 AC_CHECK_FUNCS([ \
+   fork \
getdents \
if_indextoname \
inet_ntop \
diff --git a/strace.c b/strace.c
index da8cc4a..56ffbe5 100644
--- a/strace.c
+++ b/strace.c
@@ -212,6 +212,14 @@ foobar()
 #endif /* MIPS */
 #endif /* SVR4 */
 
+/* Glue for systems without a MMU that cannot provide fork() */
+#ifdef HAVE_FORK
+# define strace_vforked false
+#else
+# define strace_vforked true
+# define fork() vfork()
+#endif
+
 static int
 set_cloexec_flag(int fd)
 {
@@ -636,8 +644,11 @@ startup_child (char **argv)
 * Induce an immediate stop so that the parent
 * will resume us with PTRACE_SYSCALL and display
 * this execve call normally.
+* Unless of course we're on a no-MMU system where
+* we vfork()-ed, so we cannot stop the child.
 */
-   kill(getpid(), SIGSTOP);
+   if (!strace_vforked)
+   kill(getpid(), SIGSTOP);
} else {
struct sigaction sv_sigchld;
sigaction(SIGCHLD, NULL, &sv_sigchld);
@@ -2445,8 +2456,10 @@ Process %d attached (waiting for parent)\n",
 * with STOPSIG equal to some other signal
 * than SIGSTOP if we happend to attach
 * just before the process takes a signal.
+* A no-mmu vforked child won't send up a signal,
+* so skip the first (lost) execve notification.
 */
-   if ((tcp->flags & TCB_STARTUP) && WSTOPSIG(status) == SIGSTOP) {
+   if ((tcp->flags & TCB_STARTUP) && (WSTOPSIG(status) == SIGSTOP 
|| strace_vforked)) {
/*
 * This flag is there to keep us in sync.
 * Next time this process stops it should
diff --git a/syscall.c b/syscall.c
index a2e6885..6a75c70 100644
--- a/syscall.c
+++ b/syscall.c
@@ -922,9 +922,6 @@ get_scno(struct tcb *tcp)
 # elif defined(BFIN)
if (upeek(tcp, PT_ORIG_P0, &scno))
return -1;
-   /* Check if we return from execve. */
-   if (tcp->flags & TCB_WAITEXECVE && tcp->flags & TCB_INSYSCALL)
-   tcp->flags &= ~(TCB_INSYSCALL | TCB_WAITEXECVE);
 # elif defined (I386)
if (upeek(tcp, 4*ORIG_EAX, &scno) < 0)
return -1;
-- 
1.6.5.rc2


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: [PATCH v3] Add support for Linux/no-mmu with vfork

2009-10-07 Thread Dmitry V. Levin
On Wed, Oct 07, 2009 at 07:53:54PM -0400, Mike Frysinger wrote:
> On Wednesday 07 October 2009 19:35:02 Dmitry V. Levin wrote:
> > On Wed, Oct 07, 2009 at 04:10:53AM -0400, Mike Frysinger wrote:
> > > Systems that lack a MMU cannot use fork() to create the child process.
> > > First we detect if the toolchain has the fork() symbol and if it does
> > > not, we just always use vfork().  If it does, then we try that first.  If
> > > it fails due to ENOSYS, we fall back to using vfork().
> > 
> > I wonder is there any way to implement this without runtime penalty for
> > systems where fork() never returns ENOSYS?
> 
> the original reason i wrote it that way was that some people configure their 
> no-mmu C library in a non-standard way where the fork() symbol does exist but 
> only returns an error with ENOSYS.  i'm ok if you dont want to support this 
> scenario as it doesnt affect me anymore :).
> 
> so it'd be:
> #ifdef HAVE_FORK
> # define strace_vforked false
> #else
> # define fork() vfork()
> # define strace_vforked true
> #endif
> 
> then there wouldnt be any need for the other fork()->strace_fork() changes.

Yes, such variant is better.


-- 
ldv


pgpFbDPZ4Iqns.pgp
Description: PGP signature
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: [PATCH] avoid malloc(0) in getdents

2009-10-07 Thread Dmitry V. Levin
On Wed, Oct 07, 2009 at 07:48:50PM -0400, Mike Frysinger wrote:
> On Wednesday 07 October 2009 19:32:39 Dmitry V. Levin wrote:
> > On Wed, Oct 07, 2009 at 05:25:01AM -0400, Mike Frysinger wrote:
> > > When getdents finishes processing, it returns 0.  Strace uses this to
> > > then try and do malloc(0), but on some systems this will always return
> > > NULL. Since the code won't read the pointer in question if len is 0, then
> > > don't abort on the malloc(0) == NULL case.
> > 
> > When len == 0, the buffer allocated by malloc(0) is not used anyway, so
> > there are no need to malloc(0) here even on regular systems where
> > malloc(0) allocates memory, right?
> 
> yes, this is true.  it would be nice to write it like:
>   if (len && (buf = malloc(len)) == NULL) {
> but then gcc whines that buf might be used uninitialized, which is why i 
> wrote 
> it the way i did (less code change that way).
> 
> it could be written like so:
>   buf = len ? malloc(len) : NULL;
>   if (len && !buf) {

OK, let's change it this way.


-- 
ldv


pgpsLrQVEEyq2.pgp
Description: PGP signature
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: [PATCH v3] Add support for Linux/no-mmu with vfork

2009-10-07 Thread Mike Frysinger
On Wednesday 07 October 2009 19:35:02 Dmitry V. Levin wrote:
> On Wed, Oct 07, 2009 at 04:10:53AM -0400, Mike Frysinger wrote:
> > Systems that lack a MMU cannot use fork() to create the child process.
> > First we detect if the toolchain has the fork() symbol and if it does
> > not, we just always use vfork().  If it does, then we try that first.  If
> > it fails due to ENOSYS, we fall back to using vfork().
> 
> I wonder is there any way to implement this without runtime penalty for
> systems where fork() never returns ENOSYS?

the original reason i wrote it that way was that some people configure their 
no-mmu C library in a non-standard way where the fork() symbol does exist but 
only returns an error with ENOSYS.  i'm ok if you dont want to support this 
scenario as it doesnt affect me anymore :).

so it'd be:
#ifdef HAVE_FORK
# define strace_vforked false
#else
# define fork() vfork()
# define strace_vforked true
#endif

then there wouldnt be any need for the other fork()->strace_fork() changes.
-mike


signature.asc
Description: This is a digitally signed message part.
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: [PATCH] avoid malloc(0) in getdents

2009-10-07 Thread Mike Frysinger
On Wednesday 07 October 2009 19:32:39 Dmitry V. Levin wrote:
> On Wed, Oct 07, 2009 at 05:25:01AM -0400, Mike Frysinger wrote:
> > When getdents finishes processing, it returns 0.  Strace uses this to
> > then try and do malloc(0), but on some systems this will always return
> > NULL. Since the code won't read the pointer in question if len is 0, then
> > don't abort on the malloc(0) == NULL case.
> 
> When len == 0, the buffer allocated by malloc(0) is not used anyway, so
> there are no need to malloc(0) here even on regular systems where
> malloc(0) allocates memory, right?

yes, this is true.  it would be nice to write it like:
if (len && (buf = malloc(len)) == NULL) {
but then gcc whines that buf might be used uninitialized, which is why i wrote 
it the way i did (less code change that way).

it could be written like so:
buf = len ? malloc(len) : NULL;
if (len && !buf) {

the point really is to make sure the rest of the code is still executed even 
when (len == 0 && buf == NULL) so that you get the nice decoded output of "/* 
0 entries */" rather than an ugly hex address of the struct.  any other issues 
(whether to call malloc(0)/etc...) dont really matter to me.
-mike


signature.asc
Description: This is a digitally signed message part.
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: preparing to 4.5.19 release

2009-10-07 Thread Frederik Schüler
Hi Andreas,

the fix works, thanks.

On Wednesday 07 October 2009 16:44:33 Andreas Schwab wrote:
> I've pushed this change:
> 
> From 0fda1c59cc707918b7d5de9c516c629d0abb4f3c Mon Sep 17 00:00:00 2001
> From: Andreas Schwab 
> Date: Wed, 7 Oct 2009 16:00:31 +0200
> Subject: [PATCH] Fix build on ia64
> 
> * linux/ia64/syscallent.h: Update for addition of accept4 syscall
> in ../syscallent.h.

Best regards
Frederik Schüler

-- 
ENOSIG


signature.asc
Description: This is a digitally signed message part.
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: [PATCH v3] Add support for Linux/no-mmu with vfork

2009-10-07 Thread Dmitry V. Levin
On Wed, Oct 07, 2009 at 04:10:53AM -0400, Mike Frysinger wrote:
> Systems that lack a MMU cannot use fork() to create the child process.
> First we detect if the toolchain has the fork() symbol and if it does not,
> we just always use vfork().  If it does, then we try that first.  If it
> fails due to ENOSYS, we fall back to using vfork().

I wonder is there any way to implement this without runtime penalty for
systems where fork() never returns ENOSYS?


-- 
ldv


pgpq1R4ZVVBoM.pgp
Description: PGP signature
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: [PATCH] avoid malloc(0) in getdents

2009-10-07 Thread Dmitry V. Levin
On Wed, Oct 07, 2009 at 05:25:01AM -0400, Mike Frysinger wrote:
> When getdents finishes processing, it returns 0.  Strace uses this to then
> try and do malloc(0), but on some systems this will always return NULL.
> Since the code won't read the pointer in question if len is 0, then don't
> abort on the malloc(0) == NULL case.

When len == 0, the buffer allocated by malloc(0) is not used anyway, so
there are no need to malloc(0) here even on regular systems where
malloc(0) allocates memory, right?


-- 
ldv


pgpQ5r5WVSzyE.pgp
Description: PGP signature
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: semop()/semtimedop() sembuf argument printing in strace

2009-10-07 Thread Dmitry V. Levin
Hi,

On Wed, Oct 07, 2009 at 10:25:10PM +0200, Jakub Bogusz wrote:
[...]
> OK, updated patch attached.

There are two issues remained which should be addressed.

First, redundancy should be avoided.
You patch introduces 4 very similar copies of sembuf parser.

Second, user input should not be trusted at all.
Please try your patch with the following example:

$ cat semop.c
#include 
int main(void) {
return semop(-1, (struct sembuf *) main, 0x100) < 0;
}

I pushed a fix on top of your patch to
http://strace.git.sourceforge.net/git/gitweb.cgi?p=strace/strace;a=shortlog;h=ldv/sembuf
Please test.

> BTW, there are unchecked umoves in already existing sys_msgsnd() and
> sys_msgrcv()...

Yes, it should be fixed, too.


-- 
ldv


pgpmUdM6wIW9p.pgp
Description: PGP signature
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


[SPAM] 为你省钱

2009-10-07 Thread neyhardp
ÐÂÓû§ÄúºÃ£ºÎªÄܸøÄú·Öµ£ÄÉË°Ë°ÎñÉϵÄÎÊÌâ`Ϊ³«µ¼¹ú¼Ò·±ÈÙ²ýÊ¢£¬ÄÉË°¹âÈÙµÄ˼ÏëµÀ·Ϊ»ù´¡£¬±¾Ëù¿ÉÒÔΪ¸öÈË»òÆóÒµ°ìÀí·¢Æ¯´ÓÖÐÓÐЧºÏÀíµÄ¼õÇá²»±ØÒªµÄË°ÊÕ£¬»¶Ó­ÄúµÄÀ´µç×ÉѯÏà¹ØÊÂÒËÓëÔË×÷³ÌÐò¡£µç»°£º13410400463³Â¿ÆÒµÎñqq414267205»òÓʼþ£ºjunquanshu...@163.com

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: [PATCH] ioctlsort: check ppc hosts too

2009-10-07 Thread Dmitry V. Levin
On Wed, Oct 07, 2009 at 01:05:10AM -0400, Mike Frysinger wrote:
> * linux/ioctlsort.c: Check for __powerpc__.
On Wed, Oct 07, 2009 at 01:05:11AM -0400, Mike Frysinger wrote:
> * linux/bfin/ioctlent.h: Sync list latest kernel sources.
> * linux/bfin/syscallent.h: Likewise.
On Wed, Oct 07, 2009 at 01:05:12AM -0400, Mike Frysinger wrote:
> * configure.ac (AC_CHECK_FUNCS): Sorted/expanded.
On Wed, Oct 07, 2009 at 01:08:46AM -0400, Mike Frysinger wrote:
> * .gitignore: Add /*.gdb.

I pushed these harmless patches to HEAD.

On Wed, Oct 07, 2009 at 01:13:39AM -0400, Mike Frysinger wrote:
> * util.c (do_ptrace): Cast 4th arg to long.
> (ptrace_restart): Drop void* cast on 4th arg.

I tested this change and pushed it, too.

Thank you,


-- 
ldv


pgpMBcFHCwTGp.pgp
Description: PGP signature
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: [PATCH] add sys_nanosleep() for sparc

2009-10-07 Thread Dmitry V. Levin
On Wed, Oct 07, 2009 at 03:52:20PM -0400, Mike Frysinger wrote:
> * sparc/syscall.h (sys_nanosleep): New prototype.

I pushed this patch to HEAD, thanks.


-- 
ldv


pgp45mnhfMbma.pgp
Description: PGP signature
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: semop()/semtimedop() sembuf argument printing in strace

2009-10-07 Thread Jakub Bogusz
On Mon, Oct 05, 2009 at 07:39:40PM +0400, Dmitry V. Levin wrote:
> Hi,
> 
> On Wed, Sep 30, 2009 at 05:59:07PM +0200, Jakub Bogusz wrote:
> > 
> > the attached patch adds pretty printing of sembuf argument and flags to
> > semop() and semtimedop() syscalls.
> 
> Thank you for the patch.  See my comments below.
> 
> > --- strace-4.5.18/ipc.c.orig2007-01-15 21:25:52.0 +0100
> > +++ strace-4.5.18/ipc.c 2009-09-30 17:48:38.080610937 +0200
> [...]
> > @@ -273,14 +279,34 @@
> >  int sys_semop(tcp)
> >  struct tcb *tcp;
> >  {
> > +   int i;
> > +
> > if (entering(tcp)) {
> > tprintf("%lu", tcp->u_arg[0]);
> > if (indirect_ipccall(tcp)) {
> > -   tprintf(", %#lx", tcp->u_arg[3]);
> > -   tprintf(", %lu", tcp->u_arg[1]);
> > +   tprintf(", %#lx {", tcp->u_arg[3]);
> > +   for(i = 0; i < tcp->u_arg[1]; i++) {
> > +   struct sembuf sb;
> > +   umove(tcp, tcp->u_arg[3]+i*sizeof(struct 
> > sembuf), &sb);
> 
> umove() return code usually have to be taken into account, especially
> when umove() arguments come from user input.

OK, updated patch attached.

BTW, there are unchecked umoves in already existing sys_msgsnd() and
sys_msgrcv()...


Regards,

-- 
Jakub Boguszhttp://qboosh.pl/
--- strace-4.5.18/ipc.c.orig2007-01-15 21:25:52.0 +0100
+++ strace-4.5.18/ipc.c 2009-10-07 22:11:24.392613451 +0200
@@ -152,6 +152,12 @@
{ 0,NULL},
 };
 
+static const struct xlat semop_flags[] = {
+   { SEM_UNDO, "SEM_UNDO"  },
+   { IPC_NOWAIT,   "IPC_NOWAIT"},
+   { 0,NULL},
+};
+
 int sys_msgget(tcp)
 struct tcb *tcp;
 {
@@ -273,14 +279,40 @@
 int sys_semop(tcp)
 struct tcb *tcp;
 {
+   int i;
+
if (entering(tcp)) {
tprintf("%lu", tcp->u_arg[0]);
if (indirect_ipccall(tcp)) {
-   tprintf(", %#lx", tcp->u_arg[3]);
-   tprintf(", %lu", tcp->u_arg[1]);
+   tprintf(", %#lx {", tcp->u_arg[3]);
+   for(i = 0; i < tcp->u_arg[1]; i++) {
+   struct sembuf sb;
+   if(i != 0)
+   tprintf(", ");
+   if (umove(tcp, tcp->u_arg[3]+i*sizeof(struct 
sembuf), &sb) < 0)
+   tprintf("{???}");
+   else {
+   tprintf("{%u, %d, ", sb.sem_num, 
sb.sem_op);
+   printflags(semop_flags, sb.sem_flg, 
"SEM_???");
+   tprintf("}");
+   }
+   }
+   tprintf("}, %lu", tcp->u_arg[1]);
} else {
-   tprintf(", %#lx", tcp->u_arg[1]);
-   tprintf(", %lu", tcp->u_arg[2]);
+   tprintf(", %#lx {", tcp->u_arg[1]);
+   for(i = 0; i < tcp->u_arg[2]; i++) {
+   struct sembuf sb;
+   if(i != 0)
+   tprintf(", ");
+   if(umove(tcp, tcp->u_arg[1]+i*sizeof(struct 
sembuf), &sb) < 0)
+   tprintf("{???}");
+   else {
+   tprintf("{%u, %d, ", sb.sem_num, 
sb.sem_op);
+   printflags(semop_flags, sb.sem_flg, 
"SEM_???");
+   tprintf("}");
+   }
+   }
+   tprintf("}, %lu", tcp->u_arg[2]);
}
}
return 0;
@@ -290,15 +322,41 @@
 int sys_semtimedop(tcp)
 struct tcb *tcp;
 {
+   int i;
+
if (entering(tcp)) {
tprintf("%lu", tcp->u_arg[0]);
if (indirect_ipccall(tcp)) {
-   tprintf(", %#lx", tcp->u_arg[3]);
-   tprintf(", %lu, ", tcp->u_arg[1]);
+   tprintf(", %#lx {", tcp->u_arg[3]);
+   for(i = 0; i < tcp->u_arg[1]; i++) {
+   struct sembuf sb;
+   if(i != 0)
+   tprintf(", ");
+   if(umove(tcp, tcp->u_arg[3]+i*sizeof(struct 
sembuf), &sb) < 0)
+   tprintf("{???}");
+   else {
+   tprintf("{%u, %d, ", sb.sem_num, 
sb.sem_op);
+   printflags(semop_flags, sb.sem_flg, 
"SEM_???");
+   tprintf("}");
+   }
+   }
+   tprintf

[PATCH] add sys_nanosleep() for sparc

2009-10-07 Thread Mike Frysinger
* sparc/syscall.h (sys_nanosleep): New prototype.

Reported-by: Frederik Schüler 
Signed-off-by: Mike Frysinger 
---
 linux/sparc/syscall.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/linux/sparc/syscall.h b/linux/sparc/syscall.h
index 30bb8f9..e47b510 100644
--- a/linux/sparc/syscall.h
+++ b/linux/sparc/syscall.h
@@ -201,7 +201,7 @@ int sys_listxattr(), sys_llistxattr(), sys_flistxattr();
 intsys_removexattr(), sys_lremovexattr(), sys_fremovexattr();
 intsys_remap_file_pages(), sys_readahead(), sys_tgkill(), sys_statfs64();
 intsys_fstatfs64(), sys_clock_settime(), sys_clock_gettime();
-intsys_clock_getres(), sys_clock_nanosleep();
+intsys_clock_getres(), sys_clock_nanosleep(), sys_nanosleep();
 intsys_timer_create(), sys_timer_settime(), sys_timer_gettime();
 
 intsys_io_setup(), sys_io_destroy(), sys_io_submit(), sys_io_cancel(), 
sys_io_getevents();
-- 
1.6.5.rc2


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: preparing to 4.5.19 release

2009-10-07 Thread Mike Frysinger
On Wednesday 07 October 2009 09:00:50 Frederik Schüler wrote:
> and on sparc:
> 
> gcc -DHAVE_CONFIG_H -I. -I.. -Ilinux/sparc -I../linux/sparc -Ilinux
>  -I../linux -Wall -g -O2 -MT syscall.o -MD -MP -MF .deps/syscall.Tpo -c -o
>  syscall.o ../syscall.c
> In file included from ../syscall.c:129:
> ../linux/sparc/syscallent.h:250: error: ‘sys_nanosleep’ undeclared here
>  (not in a function)

looks like linux/sparc/syscall.h needs updating to match linux/syscall.h.  
sparc seems odd as it's the only one to provide its own syscall.h.  someone 
should really look at merging sparc with the common one.

at any rate, once that's fixed, things build & seem to run fine for me.
-mike


signature.asc
Description: This is a digitally signed message part.
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: preparing to 4.5.19 release

2009-10-07 Thread Andreas Schwab
Frederik Schüler  writes:

> I just did a test build on all available porter boxes, and found the build 
> failing on ia64:
>
> gcc -DHAVE_CONFIG_H -I. -I.. -Ilinux/ia64 -I../linux/ia64 -Ilinux -I../linux  
>  
> -Wall -g -O2 -MT syscall.o -MD -MP -MF .deps/syscall.Tpo -c -o syscall.o 
> ../syscall.c
> In file included from ../syscall.c:129:
> ../linux/ia64/syscallent.h:249:3: error: #error fix me
> make[2]: *** [syscall.o] Error 1
>
> looks like missing syscalls to me

I've pushed this change:

From 0fda1c59cc707918b7d5de9c516c629d0abb4f3c Mon Sep 17 00:00:00 2001
From: Andreas Schwab 
Date: Wed, 7 Oct 2009 16:00:31 +0200
Subject: [PATCH] Fix build on ia64

* linux/ia64/syscallent.h: Update for addition of accept4 syscall
in ../syscallent.h.
---
 linux/ia64/syscallent.h |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/linux/ia64/syscallent.h b/linux/ia64/syscallent.h
index d05ad9a..54eb9df 100644
--- a/linux/ia64/syscallent.h
+++ b/linux/ia64/syscallent.h
@@ -245,11 +245,10 @@
 /* You must be careful to check ../syscallent.h so that this table
starts where that one leaves off.
 */
-#if SYS_ipc_subcall + SYS_ipc_nsubcalls != 443
+#if SYS_ipc_subcall + SYS_ipc_nsubcalls != 444
 # error fix me
 #endif
 
-   { 8,0,  printargs,  "SYS_443"   }, /* 443 */
{ 8,0,  printargs,  "SYS_444"   }, /* 444 */
{ 8,0,  printargs,  "SYS_445"   }, /* 445 */
{ 8,0,  printargs,  "SYS_446"   }, /* 446 */
-- 
1.6.4.4


Andreas.

-- 
Andreas Schwab, sch...@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: preparing to 4.5.19 release

2009-10-07 Thread Frederik Schüler
Hi!

On Wednesday 07 October 2009 03:05:32 Roland McGrath wrote:
> I'd like Frederik and Andreas to reply that they see no problems, and then
> I'll tag it and push out to sourceforge and Fedora.  In the next cycle, I
> would be pleased to have Andreas and/or Dmitry do either or both of those
> last steps when we've agreed on the git rev for the release.

I just did a test build on all available porter boxes, and found the build 
failing on ia64:

gcc -DHAVE_CONFIG_H -I. -I.. -Ilinux/ia64 -I../linux/ia64 -Ilinux -I../linux   
-Wall -g -O2 -MT syscall.o -MD -MP -MF .deps/syscall.Tpo -c -o syscall.o 
../syscall.c
In file included from ../syscall.c:129:
../linux/ia64/syscallent.h:249:3: error: #error fix me
make[2]: *** [syscall.o] Error 1

looks like missing syscalls to me

and on sparc:

gcc -DHAVE_CONFIG_H -I. -I.. -Ilinux/sparc -I../linux/sparc -Ilinux -I../linux  
 
-Wall -g -O2 -MT syscall.o -MD -MP -MF .deps/syscall.Tpo -c -o syscall.o 
../syscall.c
In file included from ../syscall.c:129:
../linux/sparc/syscallent.h:250: error: ‘sys_nanosleep’ undeclared here (not 
in a function)
../syscall.c: In function ‘get_scno’:
../syscall.c:1192: error: invalid use of undefined type ‘struct regs’
../syscall.c:1234: error: invalid use of undefined type ‘struct regs’
../syscall.c:1234: warning: format ‘%08x’ expects type ‘unsigned int’, but 
argument 3 has type ‘long unsigned int’
../syscall.c:1234: warning: format ‘%08x’ expects type ‘unsigned int’, but 
argument 4 has type ‘const struct sysent *’
../syscall.c:1243: error: invalid use of undefined type ‘struct regs’
../syscall.c:1243: warning: assignment makes integer from pointer without a 
cast
../syscall.c:1245: error: invalid use of undefined type ‘struct regs’
../syscall.c:1245: warning: assignment makes integer from pointer without a 
cast
../syscall.c:1246: error: invalid use of undefined type ‘struct regs’
../syscall.c:1246: error: invalid use of undefined type ‘struct regs’
../syscall.c:1246: error: invalid use of undefined type ‘struct regs’
../syscall.c:1246: error: invalid operands to binary * (have ‘int’ and ‘const 
struct sysent *’)
../syscall.c:1246: warning: passing argument 3 of ‘memmove’ makes integer from 
pointer without a cast
../syscall.c: In function ‘get_error’:
../syscall.c:1652: error: invalid use of undefined type ‘struct regs’
../syscall.c:1652: error: invalid operands to binary & (have ‘const struct 
sysent *’ and ‘int’)
../syscall.c:1654: error: invalid use of undefined type ‘struct regs’
../syscall.c:1654: warning: assignment makes integer from pointer without a 
cast
../syscall.c:1657: error: invalid use of undefined type ‘struct regs’
../syscall.c:1657: warning: assignment makes integer from pointer without a 
cast
../syscall.c: In function ‘force_result’:
../syscall.c:1881: error: invalid use of undefined type ‘struct regs’
../syscall.c:1881: warning: statement with no effect
../syscall.c:1882: error: invalid use of undefined type ‘struct regs’
../syscall.c:1882: warning: statement with no effect
../syscall.c:1885: error: invalid use of undefined type ‘struct regs’
../syscall.c:1885: warning: statement with no effect
../syscall.c:1886: error: invalid use of undefined type ‘struct regs’
../syscall.c:1886: warning: statement with no effect
../syscall.c: In function ‘syscall_enter’:
../syscall.c:2116: error: invalid use of undefined type ‘struct regs’
../syscall.c:2116: warning: assignment makes integer from pointer without a 
cast
../syscall.c: In function ‘getrval2’:
../syscall.c:2693: error: storage size of ‘regs’ isn’t known
../syscall.c:2696: error: request for member ‘r_o1’ in something not a 
structure or union
../syscall.c:2696: warning: assignment makes integer from pointer without a 
cast
../syscall.c:2693: warning: unused variable ‘regs’
make[2]: *** [syscall.o] Error 1
make[2]: Leaving directory `/home/fs/strace-4.5.19/build'


Best regards
Frederik Schüler

-- 
ENOSIG


signature.asc
Description: This is a digitally signed message part.
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: preparing to 4.5.19 release

2009-10-07 Thread Andreas Schwab
Roland McGrath  writes:

> I'd like Frederik and Andreas to reply that they see no problems

I've gone through the fedora bugs and verified that they are fixed.

Andreas.

-- 
Andreas Schwab, sch...@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


Re: preparing to 4.5.19 release

2009-10-07 Thread Dmitry V. Levin
On Tue, Oct 06, 2009 at 06:05:32PM -0700, Roland McGrath wrote:
> I committed some nits to make for a happy make distcheck (d087571).  After
> that, everything looks good to me.

I noticed a compilation warning on x86:
util.c: In function 'do_ptrace':
util.c:260: warning: passing argument 4 of 'ptrace' makes integer from pointer 
without a cast
defs.h:163: note: expected 'long int' but argument is of type 'void *'
util.c: In function 'ptrace_restart':
util.c:282: warning: passing argument 4 of 'ptrace' makes integer from pointer 
without a cast
defs.h:163: note: expected 'long int' but argument is of type 'void *'

Mike Frysinger already submitted a fix for this issue, I'm going to check
it on x86 and x86-64, and merge it if everything is OK.

Another small issue is file timestamps in release tarball.
Since git does not store timestamps, all files will have current mtime
after checkout, while we still package files with last modification in
previous century (e.g. PORTING).

There is a script, git-set-file-times, which could be called right after
checkout to set mtime and atime of files to their latest commit time in git:
http://gitweb.samba.org/?p=rsync.git;a=blob_plain;f=support/git-set-file-times

I suggest to use it for preparing release tarball.


-- 
ldv


pgp5Y9zYkJNNa.pgp
Description: PGP signature
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


[PATCH] avoid malloc(0) in getdents

2009-10-07 Thread Mike Frysinger
When getdents finishes processing, it returns 0.  Strace uses this to then
try and do malloc(0), but on some systems this will always return NULL.
Since the code won't read the pointer in question if len is 0, then don't
abort on the malloc(0) == NULL case.

* file.c (sys_getdents, sys_getdents64): Ignore malloc(0) == NULL.

Signed-off-by: Mike Frysinger 
---
 file.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/file.c b/file.c
index c6e3b52..3d24c60 100644
--- a/file.c
+++ b/file.c
@@ -2337,7 +2337,7 @@ sys_getdents(struct tcb *tcp)
return 0;
}
len = tcp->u_rval;
-   if ((buf = malloc(len)) == NULL) {
+   if ((buf = malloc(len)) == NULL && len) {
tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
fprintf(stderr, "out of memory\n");
return 0;
@@ -2420,7 +2420,7 @@ sys_getdents64(struct tcb *tcp)
return 0;
}
len = tcp->u_rval;
-   if ((buf = malloc(len)) == NULL) {
+   if ((buf = malloc(len)) == NULL && len) {
tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
fprintf(stderr, "out of memory\n");
return 0;
-- 
1.6.5.rc2


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel


[PATCH v3] Add support for Linux/no-mmu with vfork

2009-10-07 Thread Mike Frysinger
Systems that lack a MMU cannot use fork() to create the child process.
First we detect if the toolchain has the fork() symbol and if it does not,
we just always use vfork().  If it does, then we try that first.  If it
fails due to ENOSYS, we fall back to using vfork().

Since fork() gets used in a few places, create a strace_fork() macro.
It cannot be a function due to the fun "children of a vfork share the
stack of the parent", so returning from the function the child was
spawned from would clobber the stack when the parent tried to return.

* configure.ac (AC_CHECK_FUNCS): Add fork.
* strace.c (strace_vforked, strace_fork): Define.
(strace_popen, startup_attach, trace, startup_child): Call strace_fork().
(startup_child): Do not SIGSTOP if vforked.
(trace): Skip first exec when starting up after vforked.
* syscall.c (get_scno): Drop Blackfin waitexec checks.

Signed-off-by: Mike Frysinger 
---
v3
- update to latest git which has reworked startup code

 configure.ac |1 +
 strace.c |   38 --
 syscall.c|3 ---
 3 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 95f769e..7b1a8c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,6 +209,7 @@ AC_CHECK_LIB(nsl, main)
 fi
 
 AC_CHECK_FUNCS([ \
+   fork \
getdents \
if_indextoname \
inet_ntop \
diff --git a/strace.c b/strace.c
index da8cc4a..241470b 100644
--- a/strace.c
+++ b/strace.c
@@ -212,6 +212,27 @@ foobar()
 #endif /* MIPS */
 #endif /* SVR4 */
 
+/*
+ * Glue for systems without a MMU that cannot provide fork().  Cannot
+ * be a real function as vfork()-ed children may not return from the
+ * function in which they were created (due to shared stack w/parent).
+ */
+#ifdef HAVE_FORK
+static bool strace_vforked = false;
+#define strace_fork() \
+({ \
+   pid_t __child_pid = fork(); \
+   if (__child_pid == -1 && errno == ENOSYS) { \
+   strace_vforked = true; \
+   __child_pid = vfork(); \
+   } \
+   __child_pid; \
+})
+#else
+# define strace_vforked true
+# define strace_fork()  vfork()
+#endif
+
 static int
 set_cloexec_flag(int fd)
 {
@@ -314,7 +335,7 @@ strace_popen(const char *command)
return NULL;
}
 
-   if ((popen_pid = fork()) == -1)
+   if ((popen_pid = strace_fork()) == -1)
{
fprintf(stderr, "%s: fork: %s\n",
progname, strerror(errno));
@@ -378,7 +399,7 @@ startup_attach(void)
sigprocmask(SIG_BLOCK, &blocked_set, NULL);
 
if (daemonized_tracer) {
-   pid_t pid = fork();
+   pid_t pid = strace_fork();
if (pid < 0) {
_exit(1);
}
@@ -563,7 +584,7 @@ startup_child (char **argv)
progname, filename);
exit(1);
}
-   strace_child = pid = fork();
+   strace_child = pid = strace_fork();
if (pid < 0) {
perror("strace: fork");
cleanup();
@@ -636,8 +657,11 @@ startup_child (char **argv)
 * Induce an immediate stop so that the parent
 * will resume us with PTRACE_SYSCALL and display
 * this execve call normally.
+* Unless of course we're on a no-MMU system where
+* we vfork()-ed, so we cannot stop the child.
 */
-   kill(getpid(), SIGSTOP);
+   if (!strace_vforked)
+   kill(getpid(), SIGSTOP);
} else {
struct sigaction sv_sigchld;
sigaction(SIGCHLD, NULL, &sv_sigchld);
@@ -1845,7 +1869,7 @@ int pfd;
struct procfs_status pfs;
 #endif /* FREEBSD */
 
-   switch (fork()) {
+   switch (strace_fork()) {
case -1:
perror("fork");
_exit(1);
@@ -2445,8 +2469,10 @@ Process %d attached (waiting for parent)\n",
 * with STOPSIG equal to some other signal
 * than SIGSTOP if we happend to attach
 * just before the process takes a signal.
+* A no-mmu vforked child won't send up a signal,
+* so skip the first (lost) execve notification.
 */
-   if ((tcp->flags & TCB_STARTUP) && WSTOPSIG(status) == SIGSTOP) {
+   if ((tcp->flags & TCB_STARTUP) && (WSTOPSIG(status) == SIGSTOP 
|| strace_vforked)) {
/*
 * This flag is there to keep us in sync.
 * Next time this process stops it should
diff --git a/syscall.c b/syscall.c
index a2e6885..6a75c70 100644
--- a/syscall.c
+++ b/syscall.c
@@ -922,9 +922,6 @@ get_scno(struct tcb *tcp)
 # elif defined(BFIN)
if (upeek(tcp, PT_ORIG_P0, &scno))
return -1;
-