From: Oleg Nesterov <oleg@redhat.com>
To: Markus Metzger <markus.t.metzger@intel.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, tglx@linutronix.de,
hpa@zytor.com, markus.t.metzger@gmail.com, roland@redhat.com,
eranian@googlemail.com, juan.villacis@intel.com,
ak@linux.jf.intel.com
Subject: Re: [patch 1/14] x86, ptrace: add arch_ptrace_report_exit
Date: Fri, 27 Mar 2009 15:19:37 +0100 [thread overview]
Message-ID: <20090327141937.GB14504@redhat.com> (raw)
In-Reply-To: <20090327094626.A11002@sedona.ch.intel.com>
On 03/27, Markus Metzger wrote:
>
> --- git-tip.orig/include/linux/ptrace.h 2009-03-23 10:45:30.000000000 +0100
> +++ git-tip/include/linux/ptrace.h 2009-03-23 11:31:21.000000000 +0100
> @@ -335,6 +335,23 @@ static inline void user_enable_block_ste
> #define arch_ptrace_fork(child, clone_flags) do { } while (0)
> #endif
>
> +#ifndef arch_ptrace_report_exit
> +/**
> + * arch_ptrace_report_exit - Do machine specific work for exiting ptraced tasks
> + * @exit_code: current->exit_code value
> + *
> + * This is called early from do_exit() with no locks held after we notified the
> + * ptracer.
> + */
> +#define arch_ptrace_report_exit(exit_code) do { } while (0)
> +#endif
> +
> +static inline void ptrace_report_exit(long *exit_code)
> +{
> + ptrace_event(PT_TRACE_EXIT, PTRACE_EVENT_EXIT, *exit_code);
> + arch_ptrace_report_exit(*exit_code);
> +}
> +
> extern int task_current_syscall(struct task_struct *target, long *callno,
> unsigned long args[6], unsigned int maxargs,
> unsigned long *sp, unsigned long *pc);
> Index: git-tip/include/linux/tracehook.h
> ===================================================================
> --- git-tip.orig/include/linux/tracehook.h 2009-03-23 10:45:30.000000000 +0100
> +++ git-tip/include/linux/tracehook.h 2009-03-23 11:31:21.000000000 +0100
> @@ -211,7 +211,7 @@ static inline void tracehook_report_exec
> */
> static inline void tracehook_report_exit(long *exit_code)
> {
> - ptrace_event(PT_TRACE_EXIT, PTRACE_EVENT_EXIT, *exit_code);
> + ptrace_report_exit(exit_code);
> }
This needs Rolan'd review.
But I'd say this has nothing to do with tracehooks. And why do
you pass *exit_code to arch_ptrace_report_exit() ?
Just add arch_ptrace_report_exit(void) into do_exit() ?
>From the 3/14 patch:
#define arch_ptrace_report_exit(code) x86_ptrace_report_exit(code)
void x86_ptrace_report_exit(long exit_code)
{
ptrace_bts_exit();
}
This is a bit strange. Why do we need 2 functions, ptrace_bts_exit() and
x86_ptrace_report_exit() which just calls the first one?
Oleg.
next prev parent reply other threads:[~2009-03-27 14:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 8:46 [patch 1/14] x86, ptrace: add arch_ptrace_report_exit Markus Metzger
2009-03-27 14:19 ` Oleg Nesterov [this message]
2009-03-27 15:12 ` Metzger, Markus T
2009-03-27 17:07 ` Oleg Nesterov
2009-03-27 17:37 ` Markus Metzger
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=20090327141937.GB14504@redhat.com \
--to=oleg@redhat.com \
--cc=ak@linux.jf.intel.com \
--cc=eranian@googlemail.com \
--cc=hpa@zytor.com \
--cc=juan.villacis@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.t.metzger@gmail.com \
--cc=markus.t.metzger@intel.com \
--cc=mingo@elte.hu \
--cc=roland@redhat.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