public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
	Paul Mackerras <paulus@samba.org>,
	Roland McGrath <roland@redhat.com>,
	Srinivasa Ds <srinivasa@in.ibm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/5] ptrace: change tracehook_report_syscall_exit() to handle stepping
Date: Fri, 13 Nov 2009 11:25:30 -0800	[thread overview]
Message-ID: <20091113112530.c10a3743.akpm@linux-foundation.org> (raw)
In-Reply-To: <20091112173853.GA12279@redhat.com>

On Thu, 12 Nov 2009 18:38:53 +0100
Oleg Nesterov <oleg@redhat.com> wrote:

> Change tracehook_report_syscall_exit() to look at step flag and send
> the trap signal if needed.
> 
> This change affects ia64, microblaze, parisc, powerpc, sh.  They pass
> nonzero "step" argument to tracehook but since it was ignored the tracee
> reports via ptrace_notify(), this is not right and not consistent.

This patch conflicts with utrace-core.patch a bit:

***************
*** 134,139 ****
   */
  static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step)
  {
        ptrace_report_syscall(regs);
  }
  
--- 140,147 ----
   */
  static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step)
  {
+       if (task_utrace_flags(current) & UTRACE_EVENT(SYSCALL_EXIT))
+               utrace_report_syscall_exit(regs);
        ptrace_report_syscall(regs);
  }

I did this:

  static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step)
  {
        if (step) {
                siginfo_t info;
                user_single_step_siginfo(current, regs, &info);
                force_sig_info(SIGTRAP, &info, current);
                return;
        }

+       if (task_utrace_flags(current) & UTRACE_EVENT(SYSCALL_EXIT))
+               utrace_report_syscall_exit(regs);
        ptrace_report_syscall(regs);
  }


utrace-core.patch is getting rather old.  What is its status?

  reply	other threads:[~2009-11-13 19:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12 17:38 [PATCH v2 3/5] ptrace: change tracehook_report_syscall_exit() to handle stepping Oleg Nesterov
2009-11-13 19:25 ` Andrew Morton [this message]
2009-11-13 19:25   ` Andrew Morton
2009-11-13 19:58   ` Oleg Nesterov
2009-11-13 20:15     ` 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=20091113112530.c10a3743.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=hpa@zytor.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=paulus@samba.org \
    --cc=roland@redhat.com \
    --cc=srinivasa@in.ibm.com \
    --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