mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Curtis Taylor <yamahabob28@gmail.com>
To: <linux-kernel@vger.kernel.org>
Subject: How to duplicate arbitrary process via an LKM
Date: Thu, 19 Sep 2013 10:26:17 -0400	[thread overview]
Message-ID: <CE6081C9.31B1%yamahabob28@gmail.com> (raw)

Hello all,

I'm wondering if it's possible to create an LKM that can take an arbitrary
process, removes it from the run queue, duplicates it, and re-runs it with
it's new PID. I would like to see the functionality of a simple user space
fork() but I don't want to edit the application's source code.

I'm new to writing kernel code and after looking at a kernel dev book, it
looks like the system calls clone or do_fork would be what I would leverage
for this. The problem is that clone expects some user space data data in
order to work, but maybe it's possible I could look at the task struct and
figure out everything I need?

Please 'cc' me with responses as I'm not on the mailing list.

Thanks in advance!



                 reply	other threads:[~2013-09-19 14:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CE6081C9.31B1%yamahabob28@gmail.com \
    --to=yamahabob28@gmail.com \
    --cc=linux-kernel@vger.kernel.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®