linux-um archives
 help / color / mirror / Atom feed
From: "Weiming Liu" <runemass.cse@gmail.com>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] questions about mconsole driver and process address space
Date: Thu, 28 Feb 2008 18:28:53 -0500	[thread overview]
Message-ID: <88e04e60802281528j302b61bbv2780c23f2614e8cd@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1058 bytes --]

Hi. I am doing some experiment on mconsole driver. My wish is to create a
new user process from mconsole driver, modifying its address space, changing
its file mapping... Eventually may be I can migrate a process from host or
between UML instances. I am a newbie to both kernel and UML, and I have
several questions on implementation:

1. create a new process from a kernel thread. It seems that mconsole uses a
work queque, and requests are processed at kevents thread. Right now what I
am doing is, creating a new kernel thread and letting it call sys_ececve().
I then find its task_struct by looking for its name and its parent. It seems
stupid and maybe not correct. Is there any better way to do this?

2. I need to manipulate the process' address space (memory segments, file
mappings) like what flush_old_exec() and do_mmap() are doing. I cannot find
a way to call those functions since I am in a kernel thread, and it seems
too complicated by working directly on page tables and memory. How can this
be done in a convenient way?

Thanks,
Weiming Liu

[-- Attachment #1.2: Type: text/html, Size: 1090 bytes --]

[-- Attachment #2: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #3: Type: text/plain, Size: 194 bytes --]

_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

             reply	other threads:[~2008-02-28 23:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-28 23:28 Weiming Liu [this message]
2008-03-07 17:27 ` [uml-devel] questions about mconsole driver and process address space Jeff Dike

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=88e04e60802281528j302b61bbv2780c23f2614e8cd@mail.gmail.com \
    --to=runemass.cse@gmail.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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