From: Petr Tesarik <ptesarik@suse.cz>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Roland McGrath <roland@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org, hch@infradead.org
Subject: Re: [PATCH 01/23] tracehook: add linux/tracehook.h
Date: Thu, 17 Jul 2008 13:06:52 +0200 [thread overview]
Message-ID: <1216292812.28485.6.camel@elijah.suse.cz> (raw)
In-Reply-To: <20080717084818.GA5637@martell.zuzino.mipt.ru>
On Thu, 2008-07-17 at 12:48 +0400, Alexey Dobriyan wrote:
> On Thu, Jul 17, 2008 at 12:27:55AM -0700, Roland McGrath wrote:
> > The aim is to formalize and consolidate all the places that the core
> > kernel code and the arch code now ties into the ptrace implementation.
> >
> > These patches mostly don't cause any functional change. They just
> > move the details of ptrace logic out of core code into tracehook.h
> > inlines, where they are mostly compiled away to the same as before.
>
> > All that changes is that everything is thoroughly documented
>
> This is fine.
>
> > and any future reworking of ptrace, or addition of something new,
> > would not have to touch core code all over, just change the tracehook.h
> > inlines.
>
> And this is suprising wish given one can't predict how exactly those
> "future reworking" will look like.
>
> > The new linux/ptrace.h inlines are used by the following patches in the
> > new tracehook_*() inlines. Using these helpers for the ptrace event
> > stops makes it simple to change or disable the old ptrace implementation
> > of these stops conditionally later.
>
> Call them "utrace_*" from the start?
Ah, maybe justified, because I don't expect any other re-implementation
of the same after utrace is finished, but -- there's still the old
ptrace implementation, so _not_ mentioning utrace seems a bit better to
me.
> > --- a/include/linux/ptrace.h
> > +++ b/include/linux/ptrace.h
> > @@ -121,6 +121,39 @@ static inline void ptrace_unlink(struct task_struct *child)
> > int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data);
> > int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data);
> >
> > +/**
> > + * task_ptrace - return %PT_* flags that apply to a task
> > + * @task: pointer to &task_struct in question
> > + *
> > + * Returns the %PT_* flags that apply to @task.
> > + */
> > +static inline int task_ptrace(struct task_struct *task)
> > +{
> > + return task->ptrace;
> > +}
>
> Pointless 1:1 wrapper unless you're going to #ifdef ->ptrace later.
And that's exactly what's going to happen. Look at Roland's git. ;)
Petr
next prev parent reply other threads:[~2008-07-17 11:07 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-17 7:25 [PATCH 00/23] tracehook Roland McGrath
2008-07-17 7:27 ` [PATCH 01/23] tracehook: add linux/tracehook.h Roland McGrath
2008-07-17 8:48 ` Alexey Dobriyan
2008-07-17 11:06 ` Petr Tesarik [this message]
2008-07-17 21:50 ` Alexey Dobriyan
2008-07-17 13:34 ` Christoph Hellwig
2008-07-18 11:57 ` Petr Tesarik
2008-07-17 7:28 ` [PATCH 02/23] tracehook: exec Roland McGrath
2008-07-21 8:49 ` Christoph Hellwig
2008-07-17 7:28 ` [PATCH 03/23] tracehook: unexport ptrace_notify Roland McGrath
2008-07-17 7:28 ` [PATCH 04/23] tracehook: exit Roland McGrath
2008-07-17 7:29 ` [PATCH 05/23] tracehook: clone Roland McGrath
2008-07-17 7:29 ` [PATCH 06/23] tracehook: vfork-done Roland McGrath
2008-07-17 7:29 ` [PATCH 07/23] tracehook: release_task Roland McGrath
2008-07-17 7:29 ` [PATCH 08/23] tracehook: tracehook_tracer_task Roland McGrath
2008-07-17 7:29 ` [PATCH 09/23] tracehook: tracehook_expect_breakpoints Roland McGrath
2008-07-17 7:30 ` [PATCH 10/23] tracehook: tracehook_signal_handler Roland McGrath
2008-07-17 7:30 ` [PATCH 11/23] tracehook: tracehook_consider_ignored_signal Roland McGrath
2008-07-17 7:30 ` [PATCH 12/23] tracehook: tracehook_consider_fatal_signal Roland McGrath
2008-07-17 7:30 ` [PATCH 13/23] tracehook: syscall Roland McGrath
2008-07-17 7:30 ` [PATCH 14/23] tracehook: get_signal_to_deliver Roland McGrath
2008-07-17 7:30 ` [PATCH 15/23] tracehook: job control Roland McGrath
2008-07-17 7:30 ` [PATCH 16/23] tracehook: death Roland McGrath
2008-07-17 7:30 ` [PATCH 17/23] tracehook: force signal_pending() Roland McGrath
2008-07-17 7:31 ` [PATCH 18/23] tracehook: TIF_NOTIFY_RESUME Roland McGrath
2008-07-17 7:31 ` [PATCH 19/23] tracehook: asm/syscall.h Roland McGrath
2008-07-17 7:31 ` [PATCH 20/23] tracehook: CONFIG_HAVE_ARCH_TRACEHOOK Roland McGrath
2008-07-17 7:31 ` [PATCH 21/23] tracehook: wait_task_inactive Roland McGrath
2008-07-17 7:31 ` [PATCH 22/23] task_current_syscall Roland McGrath
2008-07-17 7:31 ` [PATCH 23/23] /proc/PID/syscall Roland McGrath
2008-07-17 22:56 ` Alexey Dobriyan
2008-07-21 8:19 ` Roland McGrath
2008-07-17 7:39 ` [PATCH 00/23] tracehook Andrew Morton
2008-07-17 8:11 ` Roland McGrath
2008-07-17 8:30 ` Andrew Morton
2008-07-17 8:37 ` Roland McGrath
2008-07-17 8:51 ` Andrew Morton
2008-07-18 8:07 ` Ingo Molnar
2008-07-21 9:59 ` Roland McGrath
2008-07-18 9:20 ` David Miller
2008-07-18 11:24 ` Andi Kleen
2008-07-18 11:32 ` David Miller
2008-07-21 10:54 ` Roland McGrath
2008-07-21 15:18 ` David Miller
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=1216292812.28485.6.camel@elijah.suse.cz \
--to=ptesarik@suse.cz \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=roland@redhat.com \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®