[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080703.105858.193690507.takada@mbf.nifty.com>
Date: Thu, 03 Jul 2008 10:58:58 +0900 (JST)
From: TAKADA Yoshihito <takada@....nifty.com>
To: roland@...hat.com
Cc: mingo@...e.hu, tglx@...utronix.de, linux-kernel@...r.kernel.org,
stable@...nel.org
Subject: Re: [PATCH] x86 ptrace: fix PTRACE_GETFPXREGS error
Hi. Thanks for your right patch.
BTW, are FXSAVE and FXRSTOR instructions device?
Is it right to return ENODEV?
I think I had bettor return EXIO or ENOTSUP.
If it discussed, tell me URL of tree at lkml.org.
From: Roland McGrath <roland@...hat.com>
Subject: [PATCH] x86 ptrace: fix PTRACE_GETFPXREGS error
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@...hat.com>
> ---
> arch/x86/kernel/ptrace.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
> index a7835f2..77040b6 100644
> --- a/arch/x86/kernel/ptrace.c
> +++ b/arch/x86/kernel/ptrace.c
> @@ -943,13 +943,13 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
> 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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists