public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/9788] New: permissions error in staprun
@ 2009-01-25  3:00 eugen at debian dot org
  2009-01-25 20:00 ` [Bug runtime/9788] " eugen at debian dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: eugen at debian dot org @ 2009-01-25  3:00 UTC (permalink / raw)
  To: systemtap

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2103 bytes --]

There is some strange error in 20090124 snapshot:

% uname -a
Linux loki 2.6.29-rc2 #1 SMP PREEMPT Sun Jan 18 18:40:46 CET 2009 x86_64 GNU/Linux
% id
uid=1000(eugen) gid=1000(eugen)
groups=0(root),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),116(stapdev),1000(eugen)
% ls -l /usr/bin/staprun
-rwsr-xr-x 1 root root 31752 січ 25 03:10 /usr/bin/staprun
% ./helloworld.stp -v
Pass 1: parsed user script and 47 library script(s) in 280usr/0sys/304real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) in
10usr/0sys/4real ms.
Pass 3: using cached
/home/eugen/.systemtap/cache/11/stap_11c0f8dddd8437f12d5b2ecdd542a4fd_325.c
Pass 4: using cached
/home/eugen/.systemtap/cache/11/stap_11c0f8dddd8437f12d5b2ecdd542a4fd_325.ko
Pass 5: starting run.
Error inserting module
'/tmp/stapJa73Uz/stap_11c0f8dddd8437f12d5b2ecdd542a4fd_325.ko': File exists
Retrying, after attempted removal of module
stap_11c0f8dddd8437f12d5b2ecdd542a4fd_325 (rc 0)
hello world
ERROR: The effective user ID of staprun must be set to the root user.
  Check permissions on staprun and ensure it is a setuid root program.
Pass 5: run completed in 0usr/10sys/122real ms.
Pass 5: run failed.  Try again with another '--vp 00001' option.

Here staprun is suid-root, and stap is able to run staprun and it can remove old
module and load new one (it displays "hello world"), but after that staprun
complains that it is not suid-root and cannot remove the module.

Everything works fine when run under root.

I do not remember anything similar with 20090117 snapshot and 2.6.28 kernel.

-- 
           Summary: permissions error in staprun
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: eugen at debian dot org


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug runtime/9788] permissions error in staprun
  2009-01-25  3:00 [Bug runtime/9788] New: permissions error in staprun eugen at debian dot org
@ 2009-01-25 20:00 ` eugen at debian dot org
  2009-01-26 11:25 ` fche at redhat dot com
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: eugen at debian dot org @ 2009-01-25 20:00 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From eugen at debian dot org  2009-01-25 03:05 -------
After adding some debug print into staprun I have:

uid = 1000, euid = 0, pid = 20241
hello world
uid = 1000, euid = 1000, pid = 20241
ERROR: The effective user ID of staprun must be set to the root user.
  Check permissions on staprun and ensure it is a setuid root program.

-- 


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug runtime/9788] permissions error in staprun
  2009-01-25  3:00 [Bug runtime/9788] New: permissions error in staprun eugen at debian dot org
  2009-01-25 20:00 ` [Bug runtime/9788] " eugen at debian dot org
@ 2009-01-26 11:25 ` fche at redhat dot com
  2009-01-27 19:56 ` dsmith at redhat dot com
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: fche at redhat dot com @ 2009-01-26 11:25 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2009-01-25 20:00 -------
We believe this is a recent regression in the kernel, possibly
related to the user-credential patches to task_struct.


-- 


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug runtime/9788] permissions error in staprun
  2009-01-25  3:00 [Bug runtime/9788] New: permissions error in staprun eugen at debian dot org
  2009-01-25 20:00 ` [Bug runtime/9788] " eugen at debian dot org
  2009-01-26 11:25 ` fche at redhat dot com
@ 2009-01-27 19:56 ` dsmith at redhat dot com
  2009-01-29  9:23 ` dsmith at redhat dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dsmith at redhat dot com @ 2009-01-27 19:56 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From dsmith at redhat dot com  2009-01-27 14:35 -------
According to a git bisect of the kernel that I just finished, the regression is
caused by the following kernel change:

commit d84f4f992cbd76e8f39c488cf0c5d123843923b1
Author: David Howells <dhowells@redhat.com>
Date:   Fri Nov 14 10:39:23 2008 +1100

    CRED: Inaugurate COW credentials
    



-- 


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug runtime/9788] permissions error in staprun
  2009-01-25  3:00 [Bug runtime/9788] New: permissions error in staprun eugen at debian dot org
                   ` (2 preceding siblings ...)
  2009-01-27 19:56 ` dsmith at redhat dot com
@ 2009-01-29  9:23 ` dsmith at redhat dot com
  2009-01-29 17:18 ` dsmith at redhat dot com
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dsmith at redhat dot com @ 2009-01-29  9:23 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From dsmith at redhat dot com  2009-01-28 18:12 -------
I've added a workaround for this bug in commit 69aa1bd.  Originally staprun
exec's stapio, which exec's staprun when it is time to remove the module.  Now
staprun exec's stapio, which forks when it is time to remove the module.  The
new child exec's staprun.  The parent (stapio) waits for the child to finish,
then exits.

-- 


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug runtime/9788] permissions error in staprun
  2009-01-25  3:00 [Bug runtime/9788] New: permissions error in staprun eugen at debian dot org
                   ` (3 preceding siblings ...)
  2009-01-29  9:23 ` dsmith at redhat dot com
@ 2009-01-29 17:18 ` dsmith at redhat dot com
  2009-01-29 17:21 ` dsmith at redhat dot com
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dsmith at redhat dot com @ 2009-01-29 17:18 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From dsmith at redhat dot com  2009-01-29 17:17 -------
Created an attachment (id=3697)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3697&action=view)
test program 1


-- 


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug runtime/9788] permissions error in staprun
  2009-01-25  3:00 [Bug runtime/9788] New: permissions error in staprun eugen at debian dot org
                   ` (4 preceding siblings ...)
  2009-01-29 17:18 ` dsmith at redhat dot com
@ 2009-01-29 17:21 ` dsmith at redhat dot com
  2009-01-29 19:27 ` dsmith at redhat dot com
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dsmith at redhat dot com @ 2009-01-29 17:21 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From dsmith at redhat dot com  2009-01-29 17:18 -------
Created an attachment (id=3698)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3698&action=view)
test program 2 source


-- 


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug runtime/9788] permissions error in staprun
  2009-01-25  3:00 [Bug runtime/9788] New: permissions error in staprun eugen at debian dot org
                   ` (5 preceding siblings ...)
  2009-01-29 17:21 ` dsmith at redhat dot com
@ 2009-01-29 19:27 ` dsmith at redhat dot com
  2009-01-29 19:54 ` dsmith at redhat dot com
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dsmith at redhat dot com @ 2009-01-29 19:27 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From dsmith at redhat dot com  2009-01-29 17:18 -------
Created an attachment (id=3699)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3699&action=view)
test programs makefile


-- 


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug runtime/9788] permissions error in staprun
  2009-01-25  3:00 [Bug runtime/9788] New: permissions error in staprun eugen at debian dot org
                   ` (6 preceding siblings ...)
  2009-01-29 19:27 ` dsmith at redhat dot com
@ 2009-01-29 19:54 ` dsmith at redhat dot com
  2009-01-30 15:21 ` ananth at in dot ibm dot com
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dsmith at redhat dot com @ 2009-01-29 19:54 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From dsmith at redhat dot com  2009-01-29 17:21 -------
I've attached 2 small test programs and a Makefile that demonstrate this
problem.  While developing these test programs, I've discovered that the setuid
doesn't take effect only when the 2nd program (stapio for systemtap, test2.c for
the small test programs) creates a second thread.

-- 


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug runtime/9788] permissions error in staprun
  2009-01-25  3:00 [Bug runtime/9788] New: permissions error in staprun eugen at debian dot org
                   ` (7 preceding siblings ...)
  2009-01-29 19:54 ` dsmith at redhat dot com
@ 2009-01-30 15:21 ` ananth at in dot ibm dot com
  2009-01-31  2:11 ` dsmith at redhat dot com
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ananth at in dot ibm dot com @ 2009-01-30 15:21 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From ananth at in dot ibm dot com  2009-01-30 02:16 -------
Its time the problem is brought to lkml notice rather than working around it in
SystemTap -- this clearly looks like a regression, unless SystemTap was
depending on the feature's buggy behaviour earlier.

-- 


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug runtime/9788] permissions error in staprun
  2009-01-25  3:00 [Bug runtime/9788] New: permissions error in staprun eugen at debian dot org
                   ` (8 preceding siblings ...)
  2009-01-30 15:21 ` ananth at in dot ibm dot com
@ 2009-01-31  2:11 ` dsmith at redhat dot com
  2009-02-04 20:10 ` dsmith at redhat dot com
  2009-02-10 22:00 ` dsmith at redhat dot com
  11 siblings, 0 replies; 13+ messages in thread
From: dsmith at redhat dot com @ 2009-01-31  2:11 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From dsmith at redhat dot com  2009-01-30 14:39 -------
(In reply to comment #9)
> Its time the problem is brought to lkml notice rather than working around it in
> SystemTap -- this clearly looks like a regression, unless SystemTap was
> depending on the feature's buggy behaviour earlier.

I agree - I've filed redhat bugzilla #481783 against this and sent a message to
lkml (<http://lkml.indiana.edu/hypermail/linux/kernel/0901.3/02268.html>) with
the test programs included here.

-- 


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug runtime/9788] permissions error in staprun
  2009-01-25  3:00 [Bug runtime/9788] New: permissions error in staprun eugen at debian dot org
                   ` (9 preceding siblings ...)
  2009-01-31  2:11 ` dsmith at redhat dot com
@ 2009-02-04 20:10 ` dsmith at redhat dot com
  2009-02-10 22:00 ` dsmith at redhat dot com
  11 siblings, 0 replies; 13+ messages in thread
From: dsmith at redhat dot com @ 2009-02-04 20:10 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From dsmith at redhat dot com  2009-02-04 18:52 -------
This is also being tracked as linux kernel bug 12602
<http://bugzilla.kernel.org/show_bug.cgi?id=12602>

-- 


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug runtime/9788] permissions error in staprun
  2009-01-25  3:00 [Bug runtime/9788] New: permissions error in staprun eugen at debian dot org
                   ` (10 preceding siblings ...)
  2009-02-04 20:10 ` dsmith at redhat dot com
@ 2009-02-10 22:00 ` dsmith at redhat dot com
  11 siblings, 0 replies; 13+ messages in thread
From: dsmith at redhat dot com @ 2009-02-10 22:00 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From dsmith at redhat dot com  2009-02-10 19:57 -------
David Howells has posted a patch upstream that fixes this problem.

I've verified that this works correctly on 2.6.29-0.99.rc4.git1.fc11.x86_64.

I'll wait a week or so and remove the workaround.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|systemtap at sources dot    |dsmith at redhat dot com
                   |redhat dot com              |
             Status|NEW                         |ASSIGNED


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

end of thread, other threads:[~2009-02-10 19:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-25  3:00 [Bug runtime/9788] New: permissions error in staprun eugen at debian dot org
2009-01-25 20:00 ` [Bug runtime/9788] " eugen at debian dot org
2009-01-26 11:25 ` fche at redhat dot com
2009-01-27 19:56 ` dsmith at redhat dot com
2009-01-29  9:23 ` dsmith at redhat dot com
2009-01-29 17:18 ` dsmith at redhat dot com
2009-01-29 17:21 ` dsmith at redhat dot com
2009-01-29 19:27 ` dsmith at redhat dot com
2009-01-29 19:54 ` dsmith at redhat dot com
2009-01-30 15:21 ` ananth at in dot ibm dot com
2009-01-31  2:11 ` dsmith at redhat dot com
2009-02-04 20:10 ` dsmith at redhat dot com
2009-02-10 22:00 ` 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).