9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <russcox@gmail.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] an idea
Date: Mon, 26 Apr 2004 11:12:30 -0400	[thread overview]
Message-ID: <C9C19233.4D3B50B5@mail.gmail.com> (raw)
In-Reply-To: <499f328d8dc6462edbadb7e4894feaf8@vitanuova.com>

Here's an independent but seemingly similar idea.

Suppose the kernel were a good 9P multiplexor instead
of a cleaner Unix kernel with devmnt hanging on the side.
All the devices would speak in terms of 9P messages (something
like Fcall or lib9p's Req, not the wire representation).  The
traditional system calls open, read, write, etc. would simply
translate into the obvious 9P transactions, always.  Devmnt's
job then is only to read/write messages from fds.

With 9P messages at the center, exportfs is trivial -- the kernel
would need to rewrite tags and fids in the messages on
their way to the appropriate 9P server.  Suppose also that the
kernel was smart about mounting a channel it exports, noticing
this case and avoiding the extra packs and unpacks to and
from wire representation.  Then fd = exportfs("/a"); mount(fd, "/b", MREPL);
would be equivalent to bind("/a", "/b", MREPL) as far as message
efficiency is concerned -- in neither case would accesses to /b be
any different (in terms of extra wire traffic over pipes) than 
access to /a. 

Now suppose /srv could only post 9P services, meaning that when
multiple people opened the same service, the kernel would take
care of multiplexing their 9P requests appropriately so that the
original poster would only see a single logical 9P conversation.
Then there's no difference between mounting a fd somewhere
and opening that same fd and doing your own 9P traffic on it
via read and write.  (You can't do that right now because once
a fd gets mounted, r/w from user-space would not get multiplexed
properly.)

Now the # names can go away too -- the kernel just starts
by posting all its devices in /srv.  

Of course, this says nothing about auth files, much less authentication.

I think that your scheme uses auth files the same way mine does
9P services.  Put another way, I think (and I could be way off base
here) that your scheme posts unauthenticated 9P services while
mine posts preauthenticated 9P services.

I don't see how to do authentication in user space and keep the
"reductions" of things like fd = exportfs("/a"); mount(fd, "/b", MREPL);.
It might be that on the local machine people are already authenticated
"enough", but I don't see what to do to serve incoming network
connections.

I think some of the things you brought up are independent of
either scheme.  For example, having a file descriptor represent
an unopened file and bootstrapping newns by setting up a name
space in a subtree and binding onto / could be done now without
any significant kernel changes.

What I don't really understand about your scheme is how much
you're getting from an auth file being authentication-related and
how much you're getting from it being the beginning of a 9P 
connection.

I do think there's a germ of a good idea here, but the devil
is in the details.

Russ


  parent reply	other threads:[~2004-04-26 15:12 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-11 19:14 [9fans] german keymap Scusi
2004-04-11 19:28 ` boyd, rounin
2004-04-11 20:00   ` Scusi
2004-04-11 20:03     ` boyd, rounin
2004-04-11 22:10 ` Geoff Collyer
2004-04-11 22:39   ` Russ Cox
2004-04-11 22:55     ` Geoff Collyer
2004-04-12  0:01       ` Russ Cox
2004-04-12  0:06         ` Geoff Collyer
2004-04-12  0:22           ` Charles Forsyth
2004-04-12  2:42           ` boyd, rounin
2004-04-12  2:57             ` countryjoe
2004-04-12  4:02               ` boyd, rounin
2004-04-12  2:40         ` boyd, rounin
2004-04-12  2:35       ` boyd, rounin
2004-04-12  2:33     ` boyd, rounin
2004-04-21 17:43   ` rog
2004-04-21 17:44     ` boyd, rounin
2004-04-21 17:56       ` rog
2004-04-21 18:03         ` boyd, rounin
2004-04-21 18:41           ` rog
2004-04-21 18:42             ` Rob Pike
2004-04-21 19:16               ` rog
2004-04-21 18:43             ` boyd, rounin
2004-04-21 18:47             ` boyd, rounin
2004-04-21 18:57               ` Rob Pike
2004-04-21 18:58                 ` boyd, rounin
2004-04-21 19:20                   ` rog
2004-04-21 19:58                     ` boyd, rounin
2004-04-21 20:26                       ` rog
2004-04-21 21:26     ` [9fans] an idea rog
2004-04-26  7:57       ` Fco.J.Ballesteros
2004-04-26  8:04         ` Charles Forsyth
2004-04-26  8:10           ` Fco.J.Ballesteros
2004-04-26  8:13             ` Charles Forsyth
2004-04-26 16:41         ` rog
2004-04-26 16:43           ` Charles Forsyth
2004-04-26 16:57             ` rog
2004-04-26 16:48           ` Fco.J.Ballesteros
2004-04-27  1:44         ` Scott Schwartz
2004-04-27  6:43           ` Fco.J.Ballesteros
2004-04-26 15:12       ` Russ Cox [this message]
2004-04-26 15:49         ` ron minnich
2004-04-26 16:42           ` rog
2004-04-26 16:59           ` Russ Cox
2004-04-26 17:05             ` Charles Forsyth
2004-04-26 18:04               ` Philippe Anel
2004-04-26 18:16                 ` rog
2004-04-26 18:36                   ` Philippe Anel
2004-04-26 20:27                     ` rog
2004-04-27  7:44                       ` Philippe Anel
2004-04-27  8:13                     ` Fco.J.Ballesteros
2004-04-26 18:20                 ` rog
2004-04-26 18:09         ` rog
2004-04-26 18:44           ` [9fans] local 9p multiplexing Russ Cox
2004-04-26 18:54           ` [9fans] remote " Russ Cox
2004-04-26 19:44             ` rog
2004-04-28 17:37             ` [9fans] Vmware-4 and Plan 9 Ishwar Rattan
2004-04-28 17:58               ` Hugo Santos
2004-04-28 18:01               ` vic zandy
2004-04-26 18:55           ` [9fans] an idea Charles Forsyth
2004-04-26 20:12             ` rog
2004-04-26 20:40               ` Charles Forsyth
2004-04-26 23:26                 ` rog
2004-04-26 19:51           ` ron minnich
2004-04-26 20:49             ` Charles Forsyth
2004-04-22  1:57     ` [9fans] german keymap Michael Jeffrey

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=C9C19233.4D3B50B5@mail.gmail.com \
    --to=russcox@gmail.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).