From: Frederik Deweerdt <deweerdt@free.fr>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Andrew Morton <akpm@osdl.org>,
"Andrew J. Barr" <andrew.james.barr@gmail.com>,
linux-kernel@vger.kernel.org, Jan Beulich <jbeulich@novell.com>,
Andi Kleen <ak@suse.de>,
"Eric W. Biederman" <ebiederm@xmission.com>,
walt <w41ter@gmail.com>
Subject: [-mm patch] ptrace: Fix EFL_OFFSET value according to i386 pda changes (was Re: BUG on 2.6.20-rc1 when using gdb)
Date: Wed, 20 Dec 2006 18:35:21 +0000 [thread overview]
Message-ID: <20061220183521.GA28900@slug> (raw)
In-Reply-To: <45891CD1.4050506@goop.org>
On Wed, Dec 20, 2006 at 03:21:53AM -0800, Jeremy Fitzhardinge wrote:
> "walt" <w41ter@gmail.com> reported a similar problem which he bisected
> down to the PDA changeset which touches ptrace
> (66e10a44d724f1464b5e8b5a3eae1e2cbbc2cca6). I haven't managed to repo
> the problem, but I guess there's something nasty going on in ptrace -
> maybe its screwing up eflags on the stack or something. Need to
> double-check all the conversions from kernel<->usermode registers. Hm,
> wonder if its fixed with the %gs->%fs conversion patch applied?
>
Hi Jeremy,
Same problems here with 2.6.20-rc1-mm1 (ie with the %gs->%fs patch).
It seems to me that the problem comes from the EFL_OFFSET no longer
beeing accurate.
The following patch fixes the problem for me.
Regards,
Frederik
Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c
index 7f7d830..00d8a5a 100644
--- a/arch/i386/kernel/ptrace.c
+++ b/arch/i386/kernel/ptrace.c
@@ -45,7 +45,7 @@
/*
* Offset of eflags on child stack..
*/
-#define EFL_OFFSET ((EFL-2)*4-sizeof(struct pt_regs))
+#define EFL_OFFSET ((EFL-1)*4-sizeof(struct pt_regs))
static inline struct pt_regs *get_child_regs(struct task_struct *task)
{
next prev parent reply other threads:[~2006-12-20 18:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-18 1:55 BUG on 2.6.20-rc1 when using gdb Andrew J. Barr
2006-12-20 0:42 ` Andrew Morton
2006-12-20 0:53 ` Dave Airlie
2006-12-20 0:54 ` Dave Airlie
2006-12-20 11:21 ` Jeremy Fitzhardinge
2006-12-20 18:35 ` Frederik Deweerdt [this message]
2006-12-20 19:02 ` [-mm patch] ptrace: Fix EFL_OFFSET value according to i386 pda changes (was Re: BUG on 2.6.20-rc1 when using gdb) Andrew J. Barr
2006-12-20 19:21 ` Jeremy Fitzhardinge
2006-12-20 20:37 ` walt
2006-12-20 20:42 ` Frederik Deweerdt
2006-12-20 20:53 ` Jeremy Fitzhardinge
2006-12-20 21:07 ` Frederik Deweerdt
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=20061220183521.GA28900@slug \
--to=deweerdt@free.fr \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=andrew.james.barr@gmail.com \
--cc=ebiederm@xmission.com \
--cc=jbeulich@novell.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=w41ter@gmail.com \
/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