public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/15114] New: [PATCH] Propagate uid and gid from nfsd module as well
@ 2013-02-07  8:36 jiri.horky at gmail dot com
  2013-02-07 16:08 ` [Bug tapsets/15114] " dsmith at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jiri.horky at gmail dot com @ 2013-02-07  8:36 UTC (permalink / raw)
  To: systemtap

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

             Bug #: 15114
           Summary: [PATCH] Propagate uid and gid from nfsd module as well
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
        AssignedTo: systemtap@sourceware.org
        ReportedBy: jiri.horky@gmail.com
    Classification: Unclassified


Created attachment 6852
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6852
patch that enables uid and gid of writers/readers in nfsd module to be used in
stap scripts.

Hi,

please see the attachment for the patch that enables uid and gid of
writers/readers in nfsd module to be used in stap scripts.

Regards
Jiri Horky

-- 
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] 6+ messages in thread

* [Bug tapsets/15114] [PATCH] Propagate uid and gid from nfsd module as well
  2013-02-07  8:36 [Bug tapsets/15114] New: [PATCH] Propagate uid and gid from nfsd module as well jiri.horky at gmail dot com
@ 2013-02-07 16:08 ` dsmith at redhat dot com
  2013-02-07 20:12 ` fche at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dsmith at redhat dot com @ 2013-02-07 16:08 UTC (permalink / raw)
  To: systemtap

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

David Smith <dsmith at redhat dot com> changed:

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

--- Comment #1 from David Smith <dsmith at redhat dot com> 2013-02-07 16:07:32 UTC ---
If I'm reading your patch correctly, you modified the 'nfsd.proc4.write' probe
alias to add the uid/gid. That's fine in itself, but there is more work to be
done:

- The 'nfsd.proc[23].write' probe aliases would also need to be modified to
export the same information (since they all get included in the 'nfsd.write'
probe alias). The 'nfsd.write' probe alias' header would need these new fields
added.

- The testsuite/buildok/nfsd-detailed.stp testcase would need to be modified to
include these new variables.

In addition to the above, we'd need to think of other places having the uid/gid
available would be useful. For instance, does it make sense to add uid/gid (and
is the information available) in the nfsd.read probes?

-- 
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] 6+ messages in thread

* [Bug tapsets/15114] [PATCH] Propagate uid and gid from nfsd module as well
  2013-02-07  8:36 [Bug tapsets/15114] New: [PATCH] Propagate uid and gid from nfsd module as well jiri.horky at gmail dot com
  2013-02-07 16:08 ` [Bug tapsets/15114] " dsmith at redhat dot com
@ 2013-02-07 20:12 ` fche at redhat dot com
  2013-02-07 20:31 ` jiri.horky at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: fche at redhat dot com @ 2013-02-07 20:12 UTC (permalink / raw)
  To: systemtap

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

Frank Ch. Eigler <fche at redhat dot com> changed:

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

--- Comment #2 from Frank Ch. Eigler <fche at redhat dot com> 2013-02-07 20:11:11 UTC ---
> If I'm reading your patch correctly, you modified the 'nfsd.proc4.write' probe
> alias to add the uid/gid. That's fine in itself, but there is more work to be
> done: [...]

(Please note that there is no requirement that such extra work be done ahead of
time or by yourselves.)

-- 
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] 6+ messages in thread

* [Bug tapsets/15114] [PATCH] Propagate uid and gid from nfsd module as well
  2013-02-07  8:36 [Bug tapsets/15114] New: [PATCH] Propagate uid and gid from nfsd module as well jiri.horky at gmail dot com
  2013-02-07 16:08 ` [Bug tapsets/15114] " dsmith at redhat dot com
  2013-02-07 20:12 ` fche at redhat dot com
@ 2013-02-07 20:31 ` jiri.horky at gmail dot com
  2013-02-07 21:33 ` dsmith at redhat dot com
  2013-03-25 19:57 ` dsmith at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: jiri.horky at gmail dot com @ 2013-02-07 20:31 UTC (permalink / raw)
  To: systemtap

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

--- Comment #3 from Jiri Horky <jiri.horky at gmail dot com> 2013-02-07 20:31:34 UTC ---
Hi,

I am sorry, this is my mistake, my hands were faster that my thinking this time
:) I forgot that we moved the uid/gid logic from standard tapset to our stap
script. We have something like:

probe module("nfsd").function("nfsd_vfs_write").return
{
        uid = $rqstp->rq_cred->cr_uid
...

(and the same for nfsd_vfs_read). 

Please consider this as a request and not as a complete patch then. But still,
other people could probably benefit from having uid/gid handy in nfsd functions
by the standard tapsets. AFAIK, systemtap is the only useful tool when it comes
to accounting per user per file activity on nfs server.

Jiri Horky

-- 
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] 6+ messages in thread

* [Bug tapsets/15114] [PATCH] Propagate uid and gid from nfsd module as well
  2013-02-07  8:36 [Bug tapsets/15114] New: [PATCH] Propagate uid and gid from nfsd module as well jiri.horky at gmail dot com
                   ` (2 preceding siblings ...)
  2013-02-07 20:31 ` jiri.horky at gmail dot com
@ 2013-02-07 21:33 ` dsmith at redhat dot com
  2013-03-25 19:57 ` dsmith at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: dsmith at redhat dot com @ 2013-02-07 21:33 UTC (permalink / raw)
  To: systemtap

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

--- Comment #4 from David Smith <dsmith at redhat dot com> 2013-02-07 21:32:27 UTC ---
Created attachment 6855
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6855
uid/gid patch for read/write

Here's a patch that adds uid/gid to nfsd.proc*.read and nfsd.proc*.write (and
adds a compile-time test). I was aided by the fact that the code was exactly
the same for all protocol variants.

The only other remaining question here is what other nfs operations does it
make sense to do this for? open? lookup? commit? create? unlink? rename? close?

-- 
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] 6+ messages in thread

* [Bug tapsets/15114] [PATCH] Propagate uid and gid from nfsd module as well
  2013-02-07  8:36 [Bug tapsets/15114] New: [PATCH] Propagate uid and gid from nfsd module as well jiri.horky at gmail dot com
                   ` (3 preceding siblings ...)
  2013-02-07 21:33 ` dsmith at redhat dot com
@ 2013-03-25 19:57 ` dsmith at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: dsmith at redhat dot com @ 2013-03-25 19:57 UTC (permalink / raw)
  To: systemtap

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

David Smith <dsmith at redhat dot com> changed:

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

--- Comment #5 from David Smith <dsmith at redhat dot com> 2013-03-25 19:57:34 UTC ---
Commit 8701bc1 adds uid/gid variables to all the nfsd.proc.* probe aliases. 

In the following email, Steve Dickson (a kernel NFS maintainer) confirmed that
providing uid/gid variables made sense for the nfsd.proc.* probe aliases.

<http://sourceware.org/ml/systemtap/2013-q1/msg00154.html>

-- 
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] 6+ messages in thread

end of thread, other threads:[~2013-03-25 19:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-07  8:36 [Bug tapsets/15114] New: [PATCH] Propagate uid and gid from nfsd module as well jiri.horky at gmail dot com
2013-02-07 16:08 ` [Bug tapsets/15114] " dsmith at redhat dot com
2013-02-07 20:12 ` fche at redhat dot com
2013-02-07 20:31 ` jiri.horky at gmail dot com
2013-02-07 21:33 ` dsmith at redhat dot com
2013-03-25 19:57 ` dsmith 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).