From: Daniel Jacobowitz <drow@false.org>
To: Andi Kleen <ak@suse.de>
Cc: Datoda <datoda@yahoo.com>, gdb-patches@sourceware.org
Subject: Re: [rfa] Handle amd64-linux %orig_rax
Date: Tue, 31 Oct 2006 19:30:00 -0000 [thread overview]
Message-ID: <20061031193035.GA31708@nevyn.them.org> (raw)
In-Reply-To: <200610312011.20880.ak@suse.de>
On Tue, Oct 31, 2006 at 08:11:20PM +0100, Andi Kleen wrote:
>
> > Oh dear. So if we set registers on the syscall exit path, the
> > kernel/ISA may just eat them. And we have no reliable way to know
> > whether we're stopped on the syscall exit path.
>
> If you're single stepping over it you can remember it from
> one instruction before (check if the opcode is SYSCALL or SYSENTER,
> these are unique 2 byte opcodes each)
>
> If someone sets a breakpoint directly on the return point
> and doesn't single step that wouldn't work, but then you shouldn't care about
> the previous register state anyways.
This case is usually SIGINT while inside a syscall, e.g. nanosleep.
That gives us a prompt, and if the user changes $rcx there, we write
into the register - and later it gets overridden. i.e. we're at the
ptrace_stop call in kernel/signal.c:get_signal_to_deliver.
I'm not quite sure how we're getting into the problem case though?
I'd have guessed we were in sysret_signal and that uses iret.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-10-31 19:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-31 18:17 Datoda
2006-10-31 18:22 ` [rfa] " Daniel Jacobowitz
2006-10-31 18:40 ` Andi Kleen
2006-10-31 18:49 ` Daniel Jacobowitz
2006-10-31 19:11 ` Andi Kleen
2006-10-31 19:30 ` Daniel Jacobowitz [this message]
2006-10-31 19:33 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2006-11-01 15:10 Datoda
2006-11-01 15:15 ` Daniel Jacobowitz
2006-10-31 20:10 Datoda
2006-10-31 20:17 ` Andi Kleen
2006-08-19 15:34 Daniel Jacobowitz
2006-08-19 15:46 ` Mark Kettenis
2006-08-19 15:57 ` Daniel Jacobowitz
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=20061031193035.GA31708@nevyn.them.org \
--to=drow@false.org \
--cc=ak@suse.de \
--cc=datoda@yahoo.com \
--cc=gdb-patches@sourceware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox