On 25/10/10 18:17, Paul Ortyl wrote:

> On Monday 25 October 2010 17:14:06 Tom Hughes wrote:
>
>> As I read that, you can still ptrace your own descendants (which is what
>> valgrind does) just not other processes owned by the same user.
>>
>> So I think the diagnosis you were given may be wrong.
>
> Unfortunately it is not how valgrind+gdb do that.  See the bug description I
> posted at launchpad.

Ah right I understand now - it's gdb that can't attached. I was thinking 
that it was valgrind that was failing to attach - the debugger stuff 
works by valgrind cloning the child and using ptrace to control the 
cloned process you see.

> I hope that there is some kind of solution, but frankly I do not see any.
> The GDB gets started as a child of valgrind, but GDB is not parent of the
> process, which should get monitored.  So unless there is a clever trick I do
> not know how to get around this security feature which is a complete show
> stopper on a developers machine without root access.

Well I think that "feature" needs to be turned off on a development 
machine - that can be done permanently by an admin if developers don't 
have root access.

It's not only valgrind that is broken by this, you won't be able to 
attach gdb to a running process either, which is a fairly common thing 
for a developer to want to do.

This feature may be fine for production machines, especially internet 
exposed ones, but probably not for development machines.

Tom

-- 
Tom Hughes ([email protected])
http://compton.nu/

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to