Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Datoda <datoda@yahoo.com>
To: Daniel Jacobowitz <drow@false.org>, Andi Kleen <ak@suse.de>,
	  gdb-patches@sourceware.org
Subject: Re: [rfa] Handle amd64-linux %orig_rax
Date: Wed, 01 Nov 2006 15:10:00 -0000	[thread overview]
Message-ID: <20061101151010.95757.qmail@web53704.mail.yahoo.com> (raw)

Here's the kernel version info:

godel:~/gdb-ftp/gdb-6.5.50.20061030/gdb$ uname -a
Linux godel 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:29:47 EST 2005 x86_64 x86_64 x86_64 GNU/Linux

It's EL4 and quite old. Do you know what kernel version would have Andi's patch?

 
----- Original Message ----
From: Daniel Jacobowitz <drow@false.org>
To: Andi Kleen <ak@suse.de>; Datoda <datoda@yahoo.com>; gdb-patches@sourceware.org
Sent: Tuesday, October 31, 2006 2:32:57 PM
Subject: Re: [rfa] Handle amd64-linux %orig_rax


On Tue, Oct 31, 2006 at 02:30:35PM -0500, Daniel Jacobowitz wrote:
> 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.

Datoda, what kernel version were you using?  I wonder if this fixed it
as a side effect:

Commit: 7bf36bbc5e0c09271f9efe22162f8cc3f8ebd3d2 
Author: Andi Kleen <ak@suse.de> Fri, 07 Apr 2006 19:50:00 +0200 

    [PATCH] x86_64: When user could have changed RIP always force IRET

-- 
Daniel Jacobowitz
CodeSourcery



             reply	other threads:[~2006-11-01 15:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-01 15:10 Datoda [this message]
2006-11-01 15:15 ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2006-10-31 20:10 Datoda
2006-10-31 20:17 ` Andi Kleen
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
2006-10-31 19:33           ` Daniel Jacobowitz
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=20061101151010.95757.qmail@web53704.mail.yahoo.com \
    --to=datoda@yahoo.com \
    --cc=ak@suse.de \
    --cc=drow@false.org \
    --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