lkml.org 
[lkml]   [2014]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix get ERESTARTSYS with m32 in x86_64 when debug by GDB
On 04/30/2014 09:35 AM, Hui Zhu wrote:
>
> I sorry that previous patch has some format issue, post a new one.
>
> Signed-off-by: Hui Zhu <hui@codesourcery.com>
> ---
> --- a/arch/x86/kernel/ptrace.c
> +++ b/arch/x86/kernel/ptrace.c
> @@ -452,6 +452,23 @@ static int putreg(struct task_struct *ch
> if (child->thread.gs != value)
> return do_arch_prctl(child, ARCH_SET_GS, value);
> return 0;
> + case offsetof(struct user_regs_struct, orig_ax):
> + /*
> + * A 64-bit debugger setting orig_ax of a 32-bit inferior
> + * means to restore the state of the task restarting a
> + * 32-bit syscall.
> + * Make sure we interpret the -ERESTART* codes correctly
> + * in case the task is not actually still sitting at the
> + * exit from a 32-bit syscall with TS_COMPAT still set.
> + */
> + if (test_ti_thread_flag(task_thread_info(child), TIF_IA32)) {
> + struct pt_regs *regs = task_pt_regs(child);
> + regs->orig_ax = value;
> + if (syscall_get_nr(child, regs) >= 0)
> + task_thread_info(child)->status |= TS_COMPAT;
> + return 0;
> + }
> + break;
> #endif
> }

You still seems to have botched whitespace, and no patch description in
the same email so it can be automated.

-hpa



\
 
 \ /
  Last update: 2014-04-30 23:21    [W:0.068 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site