Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
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 18:49:00 -0000	[thread overview]
Message-ID: <20061031184924.GA30569@nevyn.them.org> (raw)
In-Reply-To: <200610311940.38617.ak@suse.de>

On Tue, Oct 31, 2006 at 07:40:38PM +0100, Andi Kleen wrote:
> On Tuesday 31 October 2006 19:22, Daniel Jacobowitz wrote:
> > Andi, have you got any opinion on this?  The problem arises when GDB
> > sets %orig_rax to -1 to indicate that the interrupted syscall should
> > not be resumed, and then sets %rip to some other address; the kernel is
> > still changing %rcx on the way out to userspace.  I think this sounds
> > like a kernel bug.
> 
> You would need to complain to the x86 ISA designers.
> 
> SYSRET requires us to trash %rcx, there is no other way to use it.
> This means IRET won't clobber any registers (and it is used in a few
> situations where this is critical), but it is significantly slower.

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.  There's gotta be a
better way, but I don't know what it might be...

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-10-31 18:49 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 [this message]
2006-10-31 19:11       ` Andi Kleen
2006-10-31 19:30         ` Daniel Jacobowitz
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=20061031184924.GA30569@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