9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Russ Cox" <rsc@swtch.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Glendix?
Date: Tue, 13 Nov 2007 11:26:48 -0500	[thread overview]
Message-ID: <20071113162642.1E4CA1E8C1F@holo.morphisms.net> (raw)
In-Reply-To: <47396E4D.6020005@kix.in>

> 1) Modify the Linux kernel to present a 9P interface to itself (too
> hard, almost like re-writing several important parts of the kernel)
> 2) Modify the Plan 9 userspace to work with POSIX (Yuck, and Plan9Port
> already does this)
> 3) Create a custom INIT process which will be responsible for providing
> all the "plan 9 kernelish" features that userspace programs expect (for
> eg. providing the /net directory), so that all of them can run unmodified.

As Forsyth says, this may not be such a great final-year project,
especially if you have only two months in which to do the work.

That said again, I don't think any of the three strategies above would
really make Linux feel like Plan 9.  For example, I should be able to
"9fs sources" and then run the Unix ls or the Gnome file browser
or whatever on /n/sources and have it work.

To really make it feel like Plan 9, you'd first want to write a binary
format driver (in Linux) for Plan 9's a.out binaries.  Then you can
load Plan 9 binaries directly.  That much is pretty simple.

Next, you'd want to implement the Plan 9 system calls as an "alternate
personality" for the Linux kernel, to be used when running the Plan 9
binaries.  Some of the system calls are fairly easy -- open, read, write,
close, stat, wstat -- but bind / mount will require:

  - per-process name spaces accessible to normal users
    (CLONE_NEWNS is only available to root, but you can
    probably reuse some or all of the code)

  - letting normal users do 9p mounts anywhere in their
    own name space (can probably use v9fs here)

Also rfork, notes, etc. will require a little bit of work,
but they're straightforward.

Once you've got that, then the icing on the cake would be doing
things like writing a /net for Linux and then rewriting the socket
calls to do user space file operations on /net.  Then you could 
do things like

  import othermachine /net
  firefox

Also the missing /proc files and so on.

Russ


  parent reply	other threads:[~2007-11-13 16:26 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-13  9:28 Anant Narayanan
2007-11-13 10:05 ` Gorka Guardiola
2007-11-13 10:14   ` Uriel
2007-11-13 10:33     ` Gorka Guardiola
2007-11-13 14:25       ` David Leimbach
2007-11-14  0:51         ` Alexander Sychev
2007-11-13 21:37   ` Joel C. Salomon
2007-11-13 10:17 ` Charles Forsyth
2007-11-13 10:39 ` roger peppe
2007-11-13 10:47   ` Anant Narayanan
2007-11-13 12:18     ` Uriel
2007-11-13 13:00     ` erik quanstrom
2007-11-13 13:31       ` Uriel
2007-11-13 13:47         ` roger peppe
2007-11-13 14:10           ` sqweek
2007-11-13 13:54         ` Charles Forsyth
2007-11-13 15:20           ` Anant Narayanan
2007-11-13 18:23             ` Bakul Shah
2007-11-13 14:26         ` erik quanstrom
2007-11-13 16:49           ` Uriel
2007-11-13 17:19             ` erik quanstrom
2007-11-13 17:24               ` Iruata Souza
2007-11-13 22:01               ` David Leimbach
2007-11-13 15:16         ` Anant Narayanan
2007-11-13 14:29       ` Anant Narayanan
2007-11-13 17:21         ` erik quanstrom
2007-11-13 21:41         ` Joel C. Salomon
2007-11-13 13:30 ` John Stalker
2007-11-13 15:35   ` Harri Haataja
2007-11-13 16:22     ` John Stalker
2007-11-13 16:43       ` Aki Nyrhinen
2007-11-13 16:39   ` Uriel
2007-11-13 16:46     ` Iruata Souza
2007-11-13 18:02       ` Charles Forsyth
2007-11-13 18:12         ` Iruata Souza
2007-11-13 22:04         ` David Leimbach
2007-11-13 22:16           ` David Leimbach
2007-11-13 23:19           ` Iruata Souza
2007-11-14  2:23             ` R
2007-11-14 11:44               ` Iruata Souza
2007-11-14 12:17                 ` R
2007-11-14 12:40                   ` Christian Kellermann
2007-11-14 13:01                     ` R
2007-11-14 13:08                       ` Christian Kellermann
2007-11-13 17:48     ` John Stalker
2007-11-13 16:26 ` Russ Cox [this message]
2007-11-13 16:42   ` Charles Forsyth
2007-11-13 17:44     ` Latchesar Ionkov
2007-11-14  5:44       ` ron minnich
2007-11-16  8:42 ` [9fans] Nine4Linux [WAS: Glendix?] Enrico Weigelt
2007-11-16 10:20   ` erik quanstrom
     [not found]   ` <1b69251dfdcb6b8022ff78767f07ce86@quanstro.net>
2007-11-22 18:01     ` Enrico Weigelt
2007-11-22 22:00       ` Paweł Lasek

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=20071113162642.1E4CA1E8C1F@holo.morphisms.net \
    --to=rsc@swtch.com \
    --cc=9fans@cse.psu.edu \
    /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;
as well as URLs for NNTP newsgroup(s).