public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/12470] New: Fix _wait4_opt_str
@ 2011-02-06 23:33 jan.kratochvil at redhat dot com
  2011-02-07  0:03 ` [Bug tapsets/12470] " jan.kratochvil at redhat dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-02-06 23:33 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=12470

           Summary: Fix _wait4_opt_str
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: tapsets
        AssignedTo: systemtap@sources.redhat.com
        ReportedBy: jan.kratochvil@redhat.com
              Host: x86_64-fedora14-linux-gnu
            Target: x86_64-fedora14-linux-gnu


Created attachment 5230
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5230
Fix.

_wait4_opt_str hides any unknown wait4 `options' values from the user.

default systemtap when using gdb:
wait:WNOHANG
wait:WNOHANG

fixed systemtap _wait4_opt_str when using gdb:
wait:WNOHANG
wait:WNOHANG|__WCLONE|0xffffffff00000000

fixed systemtap with the full patch to strip `options' to 32bit:
wait:WNOHANG
wait:WNOHANG|__WCLONE

The patch applies to both HEAD and systemtap-1.3-3.fc14.x86_64.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tapsets/12470] Fix _wait4_opt_str
  2011-02-06 23:33 [Bug tapsets/12470] New: Fix _wait4_opt_str jan.kratochvil at redhat dot com
@ 2011-02-07  0:03 ` jan.kratochvil at redhat dot com
  2011-02-09 16:42 ` dsmith at redhat dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-02-07  0:03 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=12470

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #5230|0                           |1
        is obsolete|                            |

--- Comment #1 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2011-02-07 00:03:04 UTC ---
Created attachment 5231
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5231
Fix #2.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tapsets/12470] Fix _wait4_opt_str
  2011-02-06 23:33 [Bug tapsets/12470] New: Fix _wait4_opt_str jan.kratochvil at redhat dot com
  2011-02-07  0:03 ` [Bug tapsets/12470] " jan.kratochvil at redhat dot com
@ 2011-02-09 16:42 ` dsmith at redhat dot com
  2011-02-15 19:07 ` jan.kratochvil at redhat dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dsmith at redhat dot com @ 2011-02-09 16:42 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=12470

David Smith <dsmith at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dsmith at redhat dot com

--- Comment #2 from David Smith <dsmith at redhat dot com> 2011-02-09 16:42:03 UTC ---
(In reply to comment #1)
> Created attachment 5231 [details]
> Fix #2.

The patch looks reasonable to me in general.  However, we don't handle unknown
option values like this anywhere else (that I know of).  If we decide this is a
good idea, we should probably file a bug against the rest of the option
decoding functions.

One more thing.  The patch might be improved by using the functionality
implemented for bug #11566, which would change code like this:

  if (f & 1)
    {
      f&=~1
      retval=retval."|WNOHANG"
    }

into something like this (actually using the #defines):

  if (f & %{ WNOHANG %})
    {
      f&=%{ ~WNOHANG %}
      retval=retval."|WNOHANG"
    }

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tapsets/12470] Fix _wait4_opt_str
  2011-02-06 23:33 [Bug tapsets/12470] New: Fix _wait4_opt_str jan.kratochvil at redhat dot com
  2011-02-07  0:03 ` [Bug tapsets/12470] " jan.kratochvil at redhat dot com
  2011-02-09 16:42 ` dsmith at redhat dot com
@ 2011-02-15 19:07 ` jan.kratochvil at redhat dot com
  2011-02-15 19:08 ` jan.kratochvil at redhat dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-02-15 19:07 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=12470

--- Comment #3 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2011-02-15 19:07:38 UTC ---
Created attachment 5243
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5243
Fix with %{ symbols %}.

(In reply to comment #2)
> we don't handle unknown option values like this anywhere else (that I know
> of).  If we decide this is a good idea, we should probably file a bug against
> the rest of the option decoding functions.

Yes, that should be done.


> into something like this (actually using the #defines):
>   if (f & %{ WNOHANG %})

Attached.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tapsets/12470] Fix _wait4_opt_str
  2011-02-06 23:33 [Bug tapsets/12470] New: Fix _wait4_opt_str jan.kratochvil at redhat dot com
                   ` (2 preceding siblings ...)
  2011-02-15 19:07 ` jan.kratochvil at redhat dot com
@ 2011-02-15 19:08 ` jan.kratochvil at redhat dot com
  2011-03-03 18:26 ` dsmith at redhat dot com
  2011-03-03 18:41 ` jan.kratochvil at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-02-15 19:08 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=12470

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #5231|0                           |1
        is obsolete|                            |

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tapsets/12470] Fix _wait4_opt_str
  2011-02-06 23:33 [Bug tapsets/12470] New: Fix _wait4_opt_str jan.kratochvil at redhat dot com
                   ` (3 preceding siblings ...)
  2011-02-15 19:08 ` jan.kratochvil at redhat dot com
@ 2011-03-03 18:26 ` dsmith at redhat dot com
  2011-03-03 18:41 ` jan.kratochvil at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: dsmith at redhat dot com @ 2011-03-03 18:26 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=12470

--- Comment #4 from David Smith <dsmith at redhat dot com> 2011-03-03 18:26:32 UTC ---
(In reply to comment #3)
> Created attachment 5243 [details]
> Fix with %{ symbols %}.
> 
> (In reply to comment #2)
> > we don't handle unknown option values like this anywhere else (that I know
> > of).  If we decide this is a good idea, we should probably file a bug against
> > the rest of the option decoding functions.
> 
> Yes, that should be done.
> 
> > into something like this (actually using the #defines):
> >   if (f & %{ WNOHANG %})
> 
> Attached.

Your latest attachment looks good to me, doesn't have any compile problems on
x86_64 RHEL4, so go ahead and check it in.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tapsets/12470] Fix _wait4_opt_str
  2011-02-06 23:33 [Bug tapsets/12470] New: Fix _wait4_opt_str jan.kratochvil at redhat dot com
                   ` (4 preceding siblings ...)
  2011-03-03 18:26 ` dsmith at redhat dot com
@ 2011-03-03 18:41 ` jan.kratochvil at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-03-03 18:41 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=12470

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2011-03-03 18:41:34 UTC ---
Thanks for the review.

commit 97da377b94e86c5576ea34d2ee59e7f30addc1ae
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Mar 3 19:38:21 2011 +0100

    Fix _wait4_opt_str output.
    http://sourceware.org/bugzilla/show_bug.cgi?id=12470

        * tapset/aux_syscalls.stp (_internal_wait_opt_str): New.
        (_wait4_opt_str, _waitid_opt_str): Call it.
        * tapset/nd_syscalls2.stp (nd_syscall.wait4) <options>
        (nd_syscall.waitpid) <options, options_str>: Cut it to 32-bit.
        * tapset/syscalls2.stp: Likewise.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-03-03 18:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-06 23:33 [Bug tapsets/12470] New: Fix _wait4_opt_str jan.kratochvil at redhat dot com
2011-02-07  0:03 ` [Bug tapsets/12470] " jan.kratochvil at redhat dot com
2011-02-09 16:42 ` dsmith at redhat dot com
2011-02-15 19:07 ` jan.kratochvil at redhat dot com
2011-02-15 19:08 ` jan.kratochvil at redhat dot com
2011-03-03 18:26 ` dsmith at redhat dot com
2011-03-03 18:41 ` jan.kratochvil at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).