From: Datoda <datoda@yahoo.com>
To: Andi Kleen <ak@suse.de>, Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [rfa] Handle amd64-linux %orig_rax
Date: Tue, 31 Oct 2006 20:10:00 -0000 [thread overview]
Message-ID: <20061031201042.71435.qmail@web53713.mail.yahoo.com> (raw)
I think i386 shouldn't have the same problems, as far as gdb inferior calls are concerned, because arguments are passed in stack rather than in registers.
----- Original Message ----
From: Andi Kleen <ak@suse.de>
To: Daniel Jacobowitz <drow@false.org>
Cc: Datoda <datoda@yahoo.com>; gdb-patches@sourceware.org
Sent: Tuesday, October 31, 2006 1:40:38 PM
Subject: Re: [rfa] Handle amd64-linux %orig_rax
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.
Ok in theory we could check if the process is traced and then
always use IRET, but then you would get different behaviour
depending on being traced or not which is probably not
a good idea.
BTW on i386 which uses SYSEXIT sometimes there are likely similar
problems. SYSEXIT also requires to clobber registers.
-Andi
next reply other threads:[~2006-10-31 20:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-31 20:10 Datoda [this message]
2006-10-31 20:17 ` Andi Kleen
-- 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 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=20061031201042.71435.qmail@web53713.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