, February 18, 2011 6:21:36 AM
Subject: Re: spontaneous reboot - ptrace
On Fri, Feb 18, 2011 at 03:58:05AM -0800, Dr. Baud wrote:
>
>
> > First, do you have a console output during the run ? Is it possible
> > that machine paniced ? If not, were there any kernel messages
you are dumping ? Can you show at least
> > the procstat -v output for the process ?
>
> Sorry for this late response but my earlier response appears to have been
> consumed by the email reflector.
>
> I'm getting an NMI. And the trouble appears to be when try
Sorry for this late response but my earlier response appears to have been
consumed by the email reflector.
I'm getting an NMI. And the trouble appears to be when trying to read via
ptrace memory segments of type KVME_TYPE_DEVICE. The app in quesion allocates a
large number of large me
On Tue, Feb 15, 2011 at 09:46:05AM -0800, Dr. Baud wrote:
> I've an interesting anomaly I'd appreciate some help with.
>
> As a result of looking at a threading problem I modified gcore
> to dump all memory segments associated with a process;
> basically comment out the "Ignore" conditional i
I've an interesting anomaly I'd appreciate some help with.
As a result of looking at a threading problem I modified gcore
to dump all memory segments associated with a process;
basically comment out the "Ignore" conditional in readmap().
The result is that the box spontaneously reboots so
- http://dev.exherbo.org/~alip/pinktrace/
> > > - a simple ptrace() wrapper library for FreeBSD and Linux. I have set up
> > > a FreeBSD-9.0-CURRENT VM today to test various new features recently
> > > added to ptrace(). This is about a behaviour difference between
> &g
On Wed, Feb 09, 2011 at 01:49:52AM +0200, Kostik Belousov wrote:
> On Wed, Feb 09, 2011 at 12:42:15AM +0200, Ali Polatel wrote:
> > Hello everyone,
> >
> > I'm the developer of pinktrace - http://dev.exherbo.org/~alip/pinktrace/
> > - a simple ptrace() wrapper
On Wed, Feb 09, 2011 at 12:42:15AM +0200, Ali Polatel wrote:
> Hello everyone,
>
> I'm the developer of pinktrace - http://dev.exherbo.org/~alip/pinktrace/
> - a simple ptrace() wrapper library for FreeBSD and Linux. I have set up
> a FreeBSD-9.0-CURRENT VM today to test
Hello everyone,
I'm the developer of pinktrace - http://dev.exherbo.org/~alip/pinktrace/
- a simple ptrace() wrapper library for FreeBSD and Linux. I have set up
a FreeBSD-9.0-CURRENT VM today to test various new features recently
added to ptrace(). This is about a behaviour difference be
> >>>> On Thu, Apr 29, 2010 at 12:06 PM, Gunnar Hinriksson
wrote:
> >>>>> Hello
> >>>>>
> >>>>> Im having a little problem using ptrace on my system.
> >>>>> If I use ptrace to attach to another process the c
2010/4/29 Gunnar Hinriksson :
> 2010/4/29 Gunnar Hinriksson :
>> 2010/4/29 Bob Bishop :
>>> Hi,
>>>
>>> On 29 Apr 2010, at 22:37, Garrett Cooper wrote:
>>>
>>>> On Thu, Apr 29, 2010 at 12:06 PM, Gunnar Hinriksson
>>>> wrote:
2010/4/29 Gunnar Hinriksson :
> 2010/4/29 Bob Bishop :
>> Hi,
>>
>> On 29 Apr 2010, at 22:37, Garrett Cooper wrote:
>>
>>> On Thu, Apr 29, 2010 at 12:06 PM, Gunnar Hinriksson
>>> wrote:
>>>> Hello
>>>>
>>>> Im hav
2010/4/29 Bob Bishop :
> Hi,
>
> On 29 Apr 2010, at 22:37, Garrett Cooper wrote:
>
>> On Thu, Apr 29, 2010 at 12:06 PM, Gunnar Hinriksson
>> wrote:
>>> Hello
>>>
>>> Im having a little problem using ptrace on my system.
>>> If
Hi,
On 29 Apr 2010, at 22:37, Garrett Cooper wrote:
> On Thu, Apr 29, 2010 at 12:06 PM, Gunnar Hinriksson wrote:
>> Hello
>>
>> Im having a little problem using ptrace on my system.
>> If I use ptrace to attach to another process the child process
>> segfau
On Thu, Apr 29, 2010 at 12:06 PM, Gunnar Hinriksson wrote:
> Hello
>
> Im having a little problem using ptrace on my system.
> If I use ptrace to attach to another process the child process
> segfaults once I detach.
> For example using this simple program.
>
> #include
Hello
Im having a little problem using ptrace on my system.
If I use ptrace to attach to another process the child process
segfaults once I detach.
For example using this simple program.
#include
#include
#include
#include
#include
int main(int argc, char *argv[])
{
int pid = atoi
>
> Linux does, I've used it.
Yep it does, here's example code:
http://alip.github.com/code/ptrace-linux-deny.c
> --
>
> Nate Eldredge
> n...@thatsmathematics.com
--
Regards,
Ali Polatel
pgpKVUVxSoTYO.pgp
Description: PGP signature
On Sun, 17 Jan 2010, Kostik Belousov wrote:
It may be a missed feature, not a bug. There is obvious hack value
in ability to modify syscall arguments from the debugger.
Do you know whether other operating systems allow this ?
Linux does, I've used it.
--
Nate Eldredge
n...@thatsmathematics.
On Sat, Jan 16, 2010 at 09:01:37PM +0200, Ali Polatel wrote:
> Hey everyone,
>
> Problem: ptrace's PT_SETREGS request can't alter system calls.
> Code: http://alip.github.com/code/ptrace-freebsd-deny.c
> Expected: The file foo.bar shouldn't be created.
> Got: T
Hey everyone,
Problem: ptrace's PT_SETREGS request can't alter system calls.
Code: http://alip.github.com/code/ptrace-freebsd-deny.c
Expected: The file foo.bar shouldn't be created.
Got: The file is created. Other efforts like replacing
PT_GETREGS/PT_SETREGS calls with PT_KILL do
Dorr, good day.
Tue, Oct 27, 2009 at 05:32:34PM -0700, Dorr H. Clark wrote:
> We believe ptrace has a problem in 6.3; we have not tried other
> releases. The same code, however, exists in 7.1.
And in HEAD too.
> The bug was first encountered in gdb...
>
> (gdb) det
> Deta
We believe ptrace has a problem in 6.3; we have not tried other
releases. The same code, however, exists in 7.1.
The bug was first encountered in gdb...
(gdb) det
Detaching from program: /usr/local/bin/emacs, process 66217
(gdb) att 66224
Attaching to program: /usr/local/bin/emacs, process
Sent: Sunday, July 26, 2009 8:50 PM
To: Diskin, Gal
Cc: freebsd-hackers@freebsd.org
Subject: Re: ptrace question
On Sun, Jul 26, 2009 at 06:11:25PM +0300, Diskin, Gal wrote:
> Hi,
> I'm using ptrace to execute one application under the control
> of another (surprisingly :P). I
On Sun, Jul 26, 2009 at 06:11:25PM +0300, Diskin, Gal wrote:
> Hi,
> I'm using ptrace to execute one application under the control
> of another (surprisingly :P). I'm trying to find the number
> of the last system call executed in the traced process from
> the tracing
Hi,
I'm using ptrace to execute one application under the control of another
(surprisingly :P). I'm trying to find the number of the last system call
executed in the traced process from the tracing process. In Linux this is done
using "orig_eax" (or "orig_rax") bu
2009/3/17 Gema niskazhu :
> Hi all!
>
> First of all sorry for my bad english.
>
> I am using Free BSD CURRENT x86_64.
>
> I am trying to use ptrace under free bsd
>
> simply to test that it works
>
> Here is my code:
>
> #include
> #include
> #
Hi all!
First of all sorry for my bad english.
I am using Free BSD CURRENT x86_64.
I am trying to use ptrace under free bsd
simply to test that it works
Here is my code:
#include
#include
#include
#include
#include
#include
#include
#include
main()
{
int pid;
int wait_val
Sorry friends!
Was lack of attention, to use normal
:D
Thank you!
_
Receba GRÁTIS as mensagens do Messenger no seu celular quando você estiver
offline. Conheça o MSN Mobile!
http://mobile.live.com/signup/signup2.aspx?lc
ANDERSON EDUARDO wrote:
someone could help me use the PT_SETREGS on FreeBSD?
I get the value of registers with PT_GETREGS normal, but when I make the modification and the use PT_SETREGS not working!
could show me an example?
_
ANDERSON EDUARDO wrote:
someone could help me use the PT_SETREGS on FreeBSD?
I get the value of registers with PT_GETREGS normal, but when I make the modification and the use PT_SETREGS not working!
could show me an example?
_
someone could help me use the PT_SETREGS on FreeBSD?
I get the value of registers with PT_GETREGS normal, but when I make the
modification and the use PT_SETREGS not working!
could show me an example?
_
Instale a Barra de Ferra
While working on Wine I hit on a race between a ptrace PT_DETACH and
subsequent PT_ATTACH which causes the SIGSTOP of this attach to get
lost and never delivered. Attached are a test program and a proposed
patch.
The test program forks a child and loops attaching and detaching to it.
It can hang
My mistake.
I noticed later that ptrace is actually called just before system call,
however system call code and arguments are already read in kernel, and
are not re-read after ptrace finished. It simply does not count with
that possiblity.
-- cut here ---
if (error == 0) {
td
o MP safety or other stuff. If it could be in fact safely moved to
the beginning of syscall(), it would greatly enhance features of ptrace().
Regards,
S.O.
signature.asc
Description: OpenPGP digital signature
Quoting Thijs Eilander <[EMAIL PROTECTED]> (from Mon, 2 Apr 2007
00:48:20 +0200):
If you are interested in doing some development to make it work, I am
porting systrace to FreeBSD but due to time restrictions development is
slow. More information about systrace can be found on
http://www.citi.
Thijs Eilander wrote:
> If you are interested in doing some development to make it work, I am
> porting systrace to FreeBSD but due to time restrictions development is
> slow. More information about systrace can be found on
> http://www.citi.umich.edu/u/provos/systrace/ and www.systrace.org
Yes I
>I'm trying to create sort of user-space access control system based on
allowing/denying syscalls. I was able (after a few problems) to start
ptracing >program, stop at every enter/exit from system call, inspect
arguments etc. What I'm however trying to do, is denying access to syscalls.
In linux I
scalls. In linux I was able to do this by changing register eax to
SYS_getpid or other safe system call using ptrace(PT_SETREGS,..).
Problem is, that FreeBSD kernel seems to ignore changed register, and
execute original system call.
If I do PT_SETREGS and right after that PT_GETREGS, I can see that
re
On Tuesday 30 January 2007 14:59, Steve Kargl wrote:
> MPICH2 has the ability to use shared memory as one of
> its communication channel. Unfortuantely, the build
> dies with an error realted to ptrace. In looking at
> a linux manpage for ptrace, I've identified that the
>
MPICH2 has the ability to use shared memory as one of
its communication channel. Unfortuantely, the build
dies with an error realted to ptrace. In looking at
a linux manpage for ptrace, I've identified that the
linux PTRACE_ATTACH and PTRACE_DETACH are equilavent to
out PT_ATTACH and PT_D
Hello,
I notice that when I attach to a process via ptrace(PT_ATTACH, ...), the
process doing the tracing becomes the parent. The real parent can then no
longer wait() for signals or anything, and may receive an ECHILD error if it
attempts to do so. This seems like a bit of an oversight to
John wrote:
- Julian Elischer's Original Message -
It is teh nextthing to look at..
The ptrace interface doesn't extend to coverthreads at all.
We willneed to design somewhole new system..
One posibility is the benedict arnold thread(*), that
talks with the debugger and con
- Julian Elischer's Original Message -
> It is teh nextthing to look at..
> The ptrace interface doesn't extend to coverthreads at all.
> We willneed to design somewhole new system..
> One posibility is the benedict arnold thread(*), that
> talks with the debugge
It is teh nextthing to look at..
The ptrace interface doesn't extend to coverthreads at all.
We willneed to design somewhole new system..
One posibility is the benedict arnold thread(*), that
talks with the debugger and controlls teh other threads..
:-)
(*) considerred a traitor by som
Is it possible (and how, if it is) to control individual threads of a
process under ptrace? If not what does this require, some kind of manual
interaction with the thread library? Some general direction pointing
would be very helpful, thanks.
-kw
Is the 'ptrace' syscall implemented in linux emulation?
29.09.2002; 03:48:17
[SorAlx] http://cydem.zp.ua/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message
Does freebsd's implementation of ptrace support a
child ptracing it's parent (non-child ptracing)?
I'm told it does, if so, could anyone give me a small
example, or give me a clue why waitpid is giving me
this error after i attach:
waitpid: No child processes
Of course the
silent wrote:
> Hi!
>
> there is a problem in ptrace code or my understanding of how
> it should work. man page says taht PT_DETACH acts same way
> PT_CONTIUNE does, but when i try to detach from process with
> PT_DETACH delayed? sigstop is delivered, and process becomes
&
Hi!
there is a problem in ptrace code or my understanding of how
it should work. man page says taht PT_DETACH acts same way
PT_CONTIUNE does, but when i try to detach from process with
PT_DETACH delayed? sigstop is delivered, and process becomes
suspended. Valid solution/workaround seems
Hi,
kern_exit.c:wait1() has the following lines in -STABLE:
> if ((p->p_sigparent != SIGCHLD) ^ ((uap->options & WLINUXCLONE) != 0))
> continue;
As it is, if you ptrace(PT_ATTACH) to a process started with
rfork(flags|RFLINUXTHPN), and do a waitpid() as you normally wo
Hi,
I recently wrote a program that was using ptrace() to suspend a process, and
resume it later. Maybe ptrace just isn't used enough, or maybe I just don't
get all the reasons behind why it's implemented the way it is, but it seems
to be somewhat buggy.
(I'm bringing this u
>
> Yes. Subsequent SIGTRAPs normally indicate that syscall tracing is
> enabled (see /sys/i386/i386/trap.c) but I don't think that's the case
> here. I'll try to figure out what's happening when I find time.
>
> DES
Is it possible that this is related to gnu/33262, wherein sendsig()
doesn't
Zhihui Zhang <[EMAIL PROTECTED]> writes:
> On 9 Feb 2002, Dag-Erling Smorgrav wrote:
> > execve(2) in kern_exec.c posts SIGTRAP if the process has debugging
> > turned on (which it does as a result of PT_TRACE_ME).
> This is one time thing. It will be catched by the first wait()
> call in the p
On 9 Feb 2002, Dag-Erling Smorgrav wrote:
> Zhihui Zhang <[EMAIL PROTECTED]> writes:
> > - PT_CONTINUE + waitpid() works fine, the trace program prints out values.
>
> This is expected behaviour.
>
> > - PT_CONTINUE alone does not work but no core-dump caused by SIGTRAP
> > - PT_DETACH + wait
Zhihui Zhang <[EMAIL PROTECTED]> writes:
> - PT_CONTINUE + waitpid() works fine, the trace program prints out values.
This is expected behaviour.
> - PT_CONTINUE alone does not work but no core-dump caused by SIGTRAP
> - PT_DETACH + waitpid() does not work and core-dump
> - PT_DETACH alone does
nstrates that a parent process can write
> > into the data space of its child by ptrace(). If the parent waits for the
> > child to exit, there is no problem. However, if the parent does not do so,
> > the child will get a SIGTRAP signal and core dumps. Can anyone give me a
>
Zhihui Zhang <[EMAIL PROTECTED]> writes:
> The following small program demonstrates that a parent process can write
> into the data space of its child by ptrace(). If the parent waits for the
> child to exit, there is no problem. However, if the parent does not do so,
> th
This is a mystery to me. I have gone through some kernel code without
luck.
The following small program demonstrates that a parent process can write
into the data space of its child by ptrace(). If the parent waits for the
child to exit, there is no problem. However, if the parent does not do
case of step or next
b) this does not work in the case of continue often
times because step will be set to 1
and hence, this code does _not_ work around the bug.
This appears to be less of a GDB bug and more of a
kernel bug in ptrace.
-Kip
--- Donald Gillies <[EMAIL PRO
> You might also consider to get this article from http://www.ddj.com/:
>
> Dr. Dobb's Journal March 1998 - Benchmarking and Software
> Testing, Tracing BSD System Calls, by Sean Eric Fagan
>
> AFAIR, in this article is explained what steps were necessary t
You might also consider to get this article from http://www.ddj.com/:
Dr. Dobb's Journal March 1998 - Benchmarking and Software
Testing, Tracing BSD System Calls, by Sean Eric Fagan
AFAIR, in this article is explained what steps were necessary to make a
ptrace() for FreeBSD.
I am coding a simple debugger, and I need to know the proper way to
save and restore the state of the debugger's terminal when the child
process is not executing. For example, if the debugger ptraces a process
which gets a signal and returns control to the debugger, the debugger
needs to restore
Thank you much, procfs events really helps !
To make truss work without procfs mounted, it's easy
to cut 1 line of PIOCBIS procfs_ioctl() code and
put it to a new PTRACE_SYSCALL ptrace() request -
really it is a same things with different names.
Then replace all open/read/write/close
Sounds like this might also be useful to make a procfs-free truss
Robert N M Watson FreeBSD Core Team, TrustedBSD Project
[EMAIL PROTECTED] NAI Labs, Safeport Network Services
On Mon, 23 Apr 2001, diman wrote:
>
> Hello, guys
>
> I'm porting ltrace to FreeBSD and have one li
Hello, guys
I'm porting ltrace to FreeBSD and have one little question.
ltrace uses non-standard PTRACE_SYSCALL request, which tells
the kernel to stop traced process on every syscall entry
and notify the parent.
It makes us possible to trace child's syscalls and *catch
execve/xfork events* and
Folks,
On Tue, Jan 02, 2001 at 09:05:29PM -0800, [EMAIL PROTECTED] wrote:
> >Number: 24035
> >Category: docs
> >Synopsis: ptrace(2) PT_STEP incorrect documentation
> >Description:
>
> in the man pge
> PT_STEP The traced process
On Wed, 31 Jan 2001, AARON J MARKS wrote:
>
> There's a good (albeit small) treatment of ptrace() in the Bach book (The
> Design of the UNIX Operating System). If you need some examples, I can
> send you some code you can look at.
Yes I need some exapmles:o) If you can,ple
There's a good (albeit small) treatment of ptrace() in the Bach book (The
Design of the UNIX Operating System). If you need some examples, I can
send you some code you can look at.
-A.
On Wed, 31 Jan 2001, Vojislav Milunovic wrote:
>
> Does anyone have some sourcecodes or some
Does anyone have some sourcecodes or some papers for ptrace() on
FreeBSD?
I'm little incurious about this function.I read man but seems that I
don't understand it:o(
--
Vojislav Milunovic
[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsu
Even I get the same error
Zhiui Zhang wrote:
> I tried remote debugging on FreeBSD 4.2 this morning. Everything was
> fine, except that I saw the following messages:
>
> (gdb) step
> ptrace(PT_GETDBREGS) failed: No such process
> ptrace(PT_GETDBREGS) failed: No suc
Your patch works for me on FreeBSD 4.2-Release. Thanks.
-Zhihui
On Thu, 7 Dec 2000, Brian Dean wrote:
> On Thu, Dec 07, 2000 at 03:30:51PM -0500, Zhiui Zhang wrote:
> > Thanks. I tried this on FreeBSD 4.2-Release (because I do not have a
> > stable or current), but I failed:
> >
> > # make
>
On Thu, Dec 07, 2000 at 03:30:51PM -0500, Zhiui Zhang wrote:
> Thanks. I tried this on FreeBSD 4.2-Release (because I do not have a
> stable or current), but I failed:
>
> # make
>
> Warning: Object directory not changed from original
> /usr/src/gnu/usr.bin/binutils/gdb
>
>
> cc: ../libbfd/lib
> {
>struct dbreg dbr;
>extern int inferior_pid;
> -
> +
>if (inferior_pid != 0 && core_bfd == NULL)
> {
>int pid = inferior_pid & ((1 << 17) - 1); /* XXX extract pid from tid */
> -
> +
>if (ptrace(
On Wed, Dec 06, 2000 at 01:04:36PM -0500, Zhiui Zhang wrote:
> I tried remote debugging on FreeBSD 4.2 this morning. Everything was
> fine, except that I saw the following messages:
>
> (gdb) step
> ptrace(PT_GETDBREGS) failed: No such process
> ptrace(PT_GETDBREGS) faile
I tried remote debugging on FreeBSD 4.2 this morning. Everything was
fine, except that I saw the following messages:
(gdb) step
ptrace(PT_GETDBREGS) failed: No such process
ptrace(PT_GETDBREGS) failed: No such process
ptrace(PT_GETDBREGS) failed: No such process
201 cred = p ? p
Hello,
I am haveing a slight problem with remote kernel debugging
using gdb. ( host & target both fbsd 4.1.1 + gdb that came
along - 4.18 )
I am able to attach and an debug the target
But I keep getting the following warning :
ptrace( PT_GETDBREGS ) failed: no such pro
Below I have provided a sample program to demonstrate the problem I am
having. Basically, when I ptrace() an ncurses program (such has ncftp
2.4.3), I cannot do a PT_CONTINUE followed by a PT_STEP normally.
To demonstrate, the program gets ncftp ready for ptracing and then calls
ptrace() with
Below I have provided a sample program to demonstrate the problem I am
having. Basically, when I ptrace() an ncurses program (such has ncftp
2.4.3), I cannot do a PT_CONTINUE followed by a PT_STEP normally.
To demonstrate, the program gets ncftp ready for ptracing and then calls
ptrace() with
I am experiencing problems with ptrace() under FreeBSD. I made a simple
example program to demonstrate. All it does is fork a child process to
execl() a simple "hello world" program and ptrace() it with PT_CONTINUE.
The first time around, everything is as it should be - the program i
79 matches
Mail list logo