mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] clone/kprobe: Do not use do_fork() when not defined
@ 2015-09-23 11:59 Petr Mladek
  2015-09-23 11:59 ` [PATCH 1/2] clone: Declare do_fork() only when available Petr Mladek
  2015-09-23 11:59 ` [PATCH 2/2] kprobe: Use _do_fork() in samples to make them work again Petr Mladek
  0 siblings, 2 replies; 4+ messages in thread
From: Petr Mladek @ 2015-09-23 11:59 UTC (permalink / raw)
  To: Andrew Morton, Ingo Molnar, Masami Hiramatsu
  Cc: Andy Lutomirski, Peter Zijlstra, H. Peter Anvin, Thomas Gleixner,
	Thiago Macieira, Jiri Kosina, linux-kernel, Petr Mladek

The commit 3033f14ab78c32687 ("clone: support passing tls argument via C
rather than pt_regs magic") introduced _do_fork() that allowed to pass
@tls parameter.

The old do_fork() is defined only for architectures that are not ready
to use this way and do not define HAVE_COPY_THREAD_TLS.

1st patch fixes do_fork() declaration.

2nd patch fixes kprobe samples to work again.

BTW: I think about renaming _do_fork() to do_fork_tls(). Then it will
use the same naming scheme as copy_thread()/copy_thread_tls().

Petr Mladek (2):
  clone: Declare do_fork() only when available
  kprobe: Use _do_fork() in samples to make them work again

 include/linux/sched.h               |  2 ++
 samples/kprobes/jprobe_example.c    | 14 +++++++-------
 samples/kprobes/kprobe_example.c    |  6 +++---
 samples/kprobes/kretprobe_example.c |  4 ++--
 4 files changed, 14 insertions(+), 12 deletions(-)

-- 
1.8.5.6


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-23 20:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-23 11:59 [PATCH 0/2] clone/kprobe: Do not use do_fork() when not defined Petr Mladek
2015-09-23 11:59 ` [PATCH 1/2] clone: Declare do_fork() only when available Petr Mladek
2015-09-23 20:43   ` Andrew Morton
2015-09-23 11:59 ` [PATCH 2/2] kprobe: Use _do_fork() in samples to make them work again Petr Mladek

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®