* [PATCH -mm] introduce tracehook_finish_jctl() helper
@ 2009-07-29 2:01 Oleg Nesterov
2009-07-29 22:45 ` Roland McGrath
2009-07-29 22:50 ` Andrew Morton
0 siblings, 2 replies; 6+ messages in thread
From: Oleg Nesterov @ 2009-07-29 2:01 UTC (permalink / raw)
To: Andrew Morton; +Cc: Roland McGrath, utrace-devel, linux-kernel
(textually depends on signals-tracehook_notify_jctl-change.patch)
Introduce the empty inline tracehook_finish_jctl() helper called by
do_signal_stop() after wakeup.
Currently we lack the ability to report this state change.
Also fix the comment, it should be placed before schedule().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
include/linux/tracehook.h | 9 +++++++++
kernel/signal.c | 2 ++
2 files changed, 11 insertions(+)
--- __UTRACE/include/linux/tracehook.h~2_FINISH_JCTL 2009-07-29 03:10:10.000000000 +0200
+++ __UTRACE/include/linux/tracehook.h 2009-07-29 03:51:42.000000000 +0200
@@ -521,6 +521,15 @@ static inline int tracehook_notify_jctl(
return notify ?: (current->ptrace & PT_PTRACED) ? why : 0;
}
+/**
+ * tracehook_finish_jctl - report about return from job control stop
+ *
+ * This is called by do_signal_stop() after wakeup.
+ */
+static inline void tracehook_finish_jctl(void)
+{
+}
+
#define DEATH_REAP -1
#define DEATH_DELAYED_GROUP_LEADER -2
--- __UTRACE/kernel/signal.c~2_FINISH_JCTL 2009-07-29 03:17:49.000000000 +0200
+++ __UTRACE/kernel/signal.c 2009-07-29 03:57:07.000000000 +0200
@@ -1735,12 +1735,12 @@ static int do_signal_stop(int signr)
read_unlock(&tasklist_lock);
}
+ /* Now we don't run again until woken by SIGCONT or SIGKILL */
do {
schedule();
} while (try_to_freeze());
- /*
- * Now we don't run again until continued.
- */
+
+ tracehook_finish_jctl();
current->exit_code = 0;
return 1;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -mm] introduce tracehook_finish_jctl() helper
2009-07-29 2:01 [PATCH -mm] introduce tracehook_finish_jctl() helper Oleg Nesterov
@ 2009-07-29 22:45 ` Roland McGrath
2009-07-29 22:50 ` Andrew Morton
1 sibling, 0 replies; 6+ messages in thread
From: Roland McGrath @ 2009-07-29 22:45 UTC (permalink / raw)
To: Oleg Nesterov; +Cc: Andrew Morton, utrace-devel, linux-kernel
Acked-by: Roland McGrath <roland@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -mm] introduce tracehook_finish_jctl() helper
2009-07-29 2:01 [PATCH -mm] introduce tracehook_finish_jctl() helper Oleg Nesterov
2009-07-29 22:45 ` Roland McGrath
@ 2009-07-29 22:50 ` Andrew Morton
2009-07-30 16:30 ` Oleg Nesterov
2009-08-01 23:32 ` Roland McGrath
1 sibling, 2 replies; 6+ messages in thread
From: Andrew Morton @ 2009-07-29 22:50 UTC (permalink / raw)
To: Oleg Nesterov; +Cc: roland, utrace-devel, linux-kernel
On Wed, 29 Jul 2009 04:01:40 +0200
Oleg Nesterov <oleg@redhat.com> wrote:
> (textually depends on signals-tracehook_notify_jctl-change.patch)
>
> Introduce the empty inline tracehook_finish_jctl() helper called by
> do_signal_stop() after wakeup.
>
> Currently we lack the ability to report this state change.
>
> Also fix the comment, it should be placed before schedule().
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> ---
>
> include/linux/tracehook.h | 9 +++++++++
> kernel/signal.c | 2 ++
> 2 files changed, 11 insertions(+)
>
> --- __UTRACE/include/linux/tracehook.h~2_FINISH_JCTL 2009-07-29 03:10:10.000000000 +0200
> +++ __UTRACE/include/linux/tracehook.h 2009-07-29 03:51:42.000000000 +0200
> @@ -521,6 +521,15 @@ static inline int tracehook_notify_jctl(
> return notify ?: (current->ptrace & PT_PTRACED) ? why : 0;
> }
>
> +/**
> + * tracehook_finish_jctl - report about return from job control stop
> + *
> + * This is called by do_signal_stop() after wakeup.
> + */
> +static inline void tracehook_finish_jctl(void)
> +{
> +}
> +
> #define DEATH_REAP -1
> #define DEATH_DELAYED_GROUP_LEADER -2
>
> --- __UTRACE/kernel/signal.c~2_FINISH_JCTL 2009-07-29 03:17:49.000000000 +0200
> +++ __UTRACE/kernel/signal.c 2009-07-29 03:57:07.000000000 +0200
> @@ -1735,12 +1735,12 @@ static int do_signal_stop(int signr)
> read_unlock(&tasklist_lock);
> }
>
> + /* Now we don't run again until woken by SIGCONT or SIGKILL */
> do {
> schedule();
> } while (try_to_freeze());
> - /*
> - * Now we don't run again until continued.
> - */
> +
> + tracehook_finish_jctl();
> current->exit_code = 0;
>
Confused. This patch has no effect.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -mm] introduce tracehook_finish_jctl() helper
2009-07-29 22:50 ` Andrew Morton
@ 2009-07-30 16:30 ` Oleg Nesterov
2009-08-01 23:32 ` Roland McGrath
1 sibling, 0 replies; 6+ messages in thread
From: Oleg Nesterov @ 2009-07-30 16:30 UTC (permalink / raw)
To: Andrew Morton; +Cc: roland, utrace-devel, linux-kernel
On 07/29, Andrew Morton wrote:
>
> On Wed, 29 Jul 2009 04:01:40 +0200
> Oleg Nesterov <oleg@redhat.com> wrote:
>
> > +static inline void tracehook_finish_jctl(void)
> > +{
> > +}
> > +
> > #define DEATH_REAP -1
> > #define DEATH_DELAYED_GROUP_LEADER -2
> >
> > --- __UTRACE/kernel/signal.c~2_FINISH_JCTL 2009-07-29 03:17:49.000000000 +0200
> > +++ __UTRACE/kernel/signal.c 2009-07-29 03:57:07.000000000 +0200
> > @@ -1735,12 +1735,12 @@ static int do_signal_stop(int signr)
> > read_unlock(&tasklist_lock);
> > }
> >
> > + /* Now we don't run again until woken by SIGCONT or SIGKILL */
> > do {
> > schedule();
> > } while (try_to_freeze());
> > - /*
> > - * Now we don't run again until continued.
> > - */
> > +
> > + tracehook_finish_jctl();
> > current->exit_code = 0;
> >
>
> Confused. This patch has no effect.
Yes, currently tracehook_finish_jctl() does nothing. This patch is
needed to add the functional changes later, without touching the code
outside of tracehook/etc. It is like tracehook_notify_resume() which
does nothing until we add the real tracing.
Oleg.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -mm] introduce tracehook_finish_jctl() helper
2009-07-29 22:50 ` Andrew Morton
2009-07-30 16:30 ` Oleg Nesterov
@ 2009-08-01 23:32 ` Roland McGrath
2009-08-03 23:53 ` Oleg Nesterov
1 sibling, 1 reply; 6+ messages in thread
From: Roland McGrath @ 2009-08-01 23:32 UTC (permalink / raw)
To: Andrew Morton; +Cc: Oleg Nesterov, utrace-devel, linux-kernel
> Confused. This patch has no effect.
Indeed, the three patches changing do_signal_stop() have no immediate
material effect. They all just clean up the code and prepare the hooks
that utrace (or something like it) needs to make tracing stops mesh well
with job control stops. I'd thought it might be simpler for review to just
roll these three together and send you a single patch to replace
signals-tracehook_notify_jctl-change.patch; but Oleg decided to keep it
sliced smaller.
Thanks,
Roland
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -mm] introduce tracehook_finish_jctl() helper
2009-08-01 23:32 ` Roland McGrath
@ 2009-08-03 23:53 ` Oleg Nesterov
0 siblings, 0 replies; 6+ messages in thread
From: Oleg Nesterov @ 2009-08-03 23:53 UTC (permalink / raw)
To: Roland McGrath; +Cc: Andrew Morton, utrace-devel, linux-kernel
On 08/01, Roland McGrath wrote:
>
> > Confused. This patch has no effect.
>
> Indeed, the three patches changing do_signal_stop() have no immediate
> material effect. They all just clean up the code and prepare the hooks
> that utrace (or something like it) needs to make tracing stops mesh well
> with job control stops. I'd thought it might be simpler for review to just
> roll these three together and send you a single patch to replace
> signals-tracehook_notify_jctl-change.patch; but Oleg decided to keep it
> sliced smaller.
But let me repeat, I would be happy if these 2 new patches are folded
into signals-tracehook_notify_jctl-change.patch.
Oleg.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-08-03 23:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-29 2:01 [PATCH -mm] introduce tracehook_finish_jctl() helper Oleg Nesterov
2009-07-29 22:45 ` Roland McGrath
2009-07-29 22:50 ` Andrew Morton
2009-07-30 16:30 ` Oleg Nesterov
2009-08-01 23:32 ` Roland McGrath
2009-08-03 23:53 ` Oleg Nesterov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox