[lkml]   [2014]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH RESEND 2/2] tracing: syscall_regfunc() should not skip kernel threads
On 04/10, Oleg Nesterov wrote:
> On 04/10, Steven Rostedt wrote:
> >
> > Hendrik, we are debating about removing
> > cc3b13c11c567c69a6356be98d0c03ff11541d5c as it stops
> > call_usermodehelper tasks from tracing their syscalls.
> >
> > If Hendrik has no problems with this, neither do I.
> OK.
> cc3b13c11c567 mentions ret_from_fork, today copy_thread(PF_KTHREAD) uses
> ret_from_kernel_thread on 32bit, and still ret_from_fork on 64 bit but
> in the last case it checks PF_KTHREAD... I am wondering why they both
> (ret_from_kernel_thread and "1: " label in ret_from_fork) can't simply
> call do_exit() at the end?

probably because we need to change all architectures...

> And, since they do not, every kernel_thread's function (fn argument of
> kernel_thread) must call do_exit itself?

Hmm yes. See fb45550d76bb5 "make sure that kernel_thread() callbacks call
do_exit() themselves".

> Looks a bit strange, I guess I missed something obvious.

And I forgot to mention, given that the kernel_thread() callback should
call do_exit() itself, then this part of cc3b13c11c567c69a63

one case when a kernel thread can reach the
usual syscall exit tracing path: when we create a kernel thread, the
child comes to ret_from_fork

is no longer relevant? A PF_KTHREAD child should never return from the
callback and thus it should never do "jmp syscall_exit" ?

Or I am totally confused?


 \ /
  Last update: 2014-04-10 20:41    [W:0.077 / U:23.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site