From: TAKADA Yoshihito <takada@mbf.nifty.com>
To: mingo@elte.hu
Cc: roland@redhat.com, tglx@linutronix.de,
linux-kernel@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH] x86 ptrace: fix PTRACE_GETFPXREGS error
Date: Thu, 03 Jul 2008 11:37:41 +0900 (JST) [thread overview]
Message-ID: <20080703.113741.226796430.takada@mbf.nifty.com> (raw)
In-Reply-To: <20080701090204.GA1729@elte.hu>
Hi.
The Roland's patch is bettor than mine.
Please apply Roland's only. Don't apply both. Either is enough.
From: Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] x86 ptrace: fix PTRACE_GETFPXREGS error
Date: Tue, 1 Jul 2008 11:02:04 +0200
>
> * Roland McGrath <roland@redhat.com> wrote:
>
> > ptrace has always returned only -EIO for all failures to access
> > registers. The user_regset calls are allowed to return a more
> > meaningful variety of errors. The REGSET_XFP calls use -ENODEV for
> > !cpu_has_fxsr hardware. Make ptrace return the traditional -EIO
> > instead of the error code from the user_regset call.
>
> since the original fix is already upstream, i've applied the delta patch
> below. Should we still do this for v2.6.26 or can we defer it to
> v2.6.27? As ptrace is the only user of this facility for now this would
> be an identity transformation AFAICS and the v2.6.26 release is very
> close.
>
> Ingo
>
> ---------------->
> Subject: x86 ptrace: fix PTRACE_GETFPXREGS error
> From: Roland McGrath <roland@redhat.com>
> Date: Mon, 30 Jun 2008 14:02:41 -0700 (PDT)
>
> ptrace has always returned only -EIO for all failures to access
> registers. The user_regset calls are allowed to return a more
> meaningful variety of errors. The REGSET_XFP calls use -ENODEV
> for !cpu_has_fxsr hardware. Make ptrace return the traditional
> -EIO instead of the error code from the user_regset call.
>
> Signed-off-by: Roland McGrath <roland@redhat.com>
> Cc: stable@kernel.org
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
> arch/x86/kernel/i387.c | 4 ++--
> arch/x86/kernel/ptrace.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> Index: tip/arch/x86/kernel/i387.c
> ===================================================================
> --- tip.orig/arch/x86/kernel/i387.c
> +++ tip/arch/x86/kernel/i387.c
> @@ -162,7 +162,7 @@ int xfpregs_get(struct task_struct *targ
> int ret;
>
> if (!cpu_has_fxsr)
> - return -EIO;
> + return -ENODEV;
>
> ret = init_fpu(target);
> if (ret)
> @@ -179,7 +179,7 @@ int xfpregs_set(struct task_struct *targ
> int ret;
>
> if (!cpu_has_fxsr)
> - return -EIO;
> + return -ENODEV;
>
> ret = init_fpu(target);
> if (ret)
> Index: tip/arch/x86/kernel/ptrace.c
> ===================================================================
> --- tip.orig/arch/x86/kernel/ptrace.c
> +++ tip/arch/x86/kernel/ptrace.c
> @@ -943,13 +943,13 @@ long arch_ptrace(struct task_struct *chi
> return copy_regset_to_user(child, &user_x86_32_view,
> REGSET_XFP,
> 0, sizeof(struct user_fxsr_struct),
> - datap);
> + datap) ? -EIO : 0;
>
> case PTRACE_SETFPXREGS: /* Set the child extended FPU state. */
> return copy_regset_from_user(child, &user_x86_32_view,
> REGSET_XFP,
> 0, sizeof(struct user_fxsr_struct),
> - datap);
> + datap) ? -EIO : 0;
> #endif
>
> #if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION
next prev parent reply other threads:[~2008-07-03 7:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-30 4:44 [PATCH] ptrace GET/SET FPXREGS broken TAKADA Yoshihito
2008-06-30 12:18 ` Ingo Molnar
2008-06-30 21:02 ` [PATCH] x86 ptrace: fix PTRACE_GETFPXREGS error Roland McGrath
2008-07-01 9:02 ` Ingo Molnar
2008-07-01 9:32 ` Roland McGrath
2008-07-01 10:11 ` Ingo Molnar
2008-07-01 14:34 ` [stable] " Greg KH
2008-07-01 14:46 ` Ingo Molnar
2008-07-01 15:02 ` Greg KH
2008-07-03 2:37 ` TAKADA Yoshihito [this message]
2008-07-03 1:58 ` TAKADA Yoshihito
2008-07-03 3:00 ` Roland McGrath
2008-06-30 21:02 ` [PATCH] ptrace GET/SET FPXREGS broken Roland McGrath
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=20080703.113741.226796430.takada@mbf.nifty.com \
--to=takada@mbf.nifty.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=roland@redhat.com \
--cc=stable@kernel.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®