public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Hui Zhu <hui_zhu@mentor.com>, Hui Zhu <teawater@gmail.com>,
	Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: pinskia@gmail.com, Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, eparis@redhat.com, ak@linux.intel.com,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"gdb@sourceware.org" <gdb@sourceware.org>,
	Pedro Alves <palves@redhat.com>
Subject: Re: [PATCH] Fix get ERESTARTSYS with m32 in x86_64 when debug by GDB
Date: Wed, 30 Apr 2014 13:43:07 -0700	[thread overview]
Message-ID: <5361605B.4080509@zytor.com> (raw)
In-Reply-To: <53612647.1040604@mentor.com>

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


  reply	other threads:[~2014-04-30 20:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-21 16:19 [PATCH] Fix get ERESTARTSYS with m32 in x86_64 when debug by GDB Hui Zhu
2014-04-21 16:33 ` H. Peter Anvin
2014-04-30  3:44   ` Hui Zhu
2014-04-30  4:50     ` H. Peter Anvin
2014-04-30  5:08       ` Andrew Pinski
2014-04-30  5:10         ` H. Peter Anvin
2014-04-30 13:35           ` Mark Kettenis
2014-04-30 16:28             ` Hui Zhu
2014-04-30 16:35               ` Hui Zhu
2014-04-30 20:43                 ` H. Peter Anvin [this message]
2014-04-30 16:35             ` H. Peter Anvin
2014-04-30 17:49             ` Pedro Alves
2014-04-30 20:44             ` H. Peter Anvin

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=5361605B.4080509@zytor.com \
    --to=hpa@zytor.com \
    --cc=ak@linux.intel.com \
    --cc=eparis@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=hui_zhu@mentor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=mingo@redhat.com \
    --cc=palves@redhat.com \
    --cc=pinskia@gmail.com \
    --cc=teawater@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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