All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Ramos <ramos_fabiano@yahoo.com.br>
To: Andi Kleen <ak@muc.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: ptrace in 2.6.5
Date: Mon, 10 May 2004 17:24:44 -0300	[thread overview]
Message-ID: <1084220684.1798.3.camel@slack.domain.invalid> (raw)
In-Reply-To: <m365b4kth8.fsf@averell.firstfloor.org>

On Mon, 2004-05-10 at 15:49, Andi Kleen wrote:
> Fabiano Ramos <ramos_fabiano@yahoo.com.br> writes:
> 
> > Hi All.
> >
> >      Is ptrace(), in singlestep mode, required to stop after a int 0x80?
> >     When tracing a sequence like
> >
> > 	mov ...
> > 	int 0x80
> > 	mov ....
> >
> >     ptrace would notify the tracer after the two movs, but not after the
> > int 0x80. I want to know if it is a bug or the expected behaviour.
> 
> What happens is that after the int 0x80 the CPU is in ring 0 (you
> don't get an trace event in that mode unless you use a kernel debugger). 
> Then when the kernel returns the last instruction executed before it is an 
> IRET. But the IRET is also executed still in ring 0 and you should not get 
> an event for it (you can not even access its code from user space).
> 
> So it's expected behaviour.
> 
> -Andi

I got it. But I need it to stop after the instruction. I am a newbie,
so is it trivial to patch the kernel so that it STOPS after the int
0x80? Can  you give me some light on it?

> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


  parent reply	other threads:[~2004-05-10 20:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1UlcA-6lq-9@gated-at.bofh.it>
2004-05-10 18:49 ` ptrace in 2.6.5 Andi Kleen
2004-05-10 19:37   ` Davide Libenzi
2004-05-10 20:24   ` Fabiano Ramos [this message]
2004-05-10 21:49     ` OGAWA Hirofumi
2004-05-10 22:47       ` OGAWA Hirofumi
2004-05-10 22:58         ` Daniel Jacobowitz
2004-05-10 23:12           ` Davide Libenzi
2004-05-11  0:40           ` Fabiano Ramos
2004-05-11  6:14             ` Davide Libenzi
2004-05-11  6:27               ` Davide Libenzi
2004-05-11  6:41                 ` Davide Libenzi
2004-05-11 14:07                   ` Daniel Jacobowitz
2004-05-10 15:46 Fabiano Ramos
2004-05-10 16:10 ` Daniel Jacobowitz
2004-05-10 16:22   ` Fabiano Ramos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1084220684.1798.3.camel@slack.domain.invalid \
    --to=ramos_fabiano@yahoo.com.br \
    --cc=ak@muc.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.