--- Topic for #linux is Next talk: "The Hurd: a GNU approach to OS design Friday Dec 13, at 21:00 GMT Wolfgang Jaehrling | Comments #qc; Spanish #redes; Dutch #taee
sarnoldwolfgang is going to be giving his presentation about GNU HURD; he first discoveredthe HURD in 1999 and has given several talks on it since then
sarnoldplease direct your questions to #qc, and find dutch translation in #taee; maybe spanish in #redes
sarnoldthanks
wolfgangmay i? :)
wolfgangi am going to talk about the Hurd, and will explain why GNU develops it, even if we already have a very mature and popular kernel for the GNU system, which of course is Linux
wolfgangthe Hurd, however, is not a kernel.  together with the GNU C library (glibc) and the GNU Mach microkernel, it provides the functionality that traditionally is provided by a Unix kernel.
wolfgangthese three components together with the rest of the GNU system (which includes gcc, GNOME, etc. and even non-GNU software like X11) they provide a POSIX-conformant operating system.
wolfgangat this point, a few notes on terminology:
wolfgangthe GNU Hurd (or simply the Hurd) is the name for one part of the system.  GNU/Hurd is the name for the whole system.  you can think of "GNU/Hurd" as "The Hurd-based GNU-system"
--> Luiso42 (Luis@199.243.77.79) has joined #linux
wolfgangbasically, this system works as follows:
<-- E0x has quit (Ping timeout for E0x[182stb59.codetel.net.do])
--> manaha (manaha@213.37.56.168) has joined #linux
wolfgangapplications from the Unix-world (i will call them POSIX-applications) use functions in the C library where they would use Unix kernel-calls on a traditional Unix.  these are basic functions like read(), write(), fork() etc.
<-- MiTo has quit (Ping timeout for MiTo[cm074-pop12.bbt.net.ar])
wolfgangthe C library communicates with the Hurd-servers to implement these functions
<-- Telemako (jpardo@231-CORU-X6.libre.retevision.es) has left #linux
--> kheb (kheb@200.78.66.187) has joined #linux
wolfgangbut the Hurd-servers are not special in any way, they are just normal programs.  so they can also use the C-library.
wolfgangyou can think of these Hurd-servers as Daemons.
wolfgangwe have a server that implements the ext2 file system
--> _bvc (~b@M465P001.adsl.highway.telekom.at) has joined #linux
wolfganganother one implements the TCP/IP protocol
wolfgangwe even have a server that just implements /dev/null
wolfganga short note about POSIX conformance:
wolfgangsome people think that even Windows NT is POSIX conformant.
wolfgangthat isn't really the case.  it only implements some _very_ basic parts of POSIX
wolfgangwhere GNU/Hurd is completely POSIX-conforming.  well, module bugs of course :)
wolfgangthis is a very important point: we are still compatible, so you can use all the free programs you like on GNU/Hurd.  at least if they are written somewhat portably
wolfgangso, GNU/Hurd is a combination of complete compatiblity and new concepts
wolfgangbut know about the new concepts:
wolfgangoh, wait i skipped something ;)
wolfgangi skipped a lot.  i first wanted to talk about the history and motivation behind the Hurd
wolfgangas you will probably know, Richard Matthew Stallman started to develop the GNU system in 1984
wolfgangthe primary goal was to be free; to be superior to proprietary systems morally, socially and ethically
wolfgangbut it was also a goal to be technically better
wolfgangif you compare GNU software with Unix software, you are likely to notice that.  Unix software often has arbitrary limits.  for example, in many Unix tools, input lines longer than 1024 characters are silently truncated.
wolfgangok, we have a question here:      <riel> how about running non-free software on the hurd ?
wolfgangit is possible to run non-free software on GNU/Hurd, but i hope nobody actually wants that.
wolfgangwe are not completely binary-compatble with GNU/Linux, so you cannot use most non-free programs currently.  there are some technical reasons why it might be problematic to be ABI (Application Binary Interface)-compatible with it, i can say more about that later if there is interest in it.
wolfgangwe have another question:    <sarnold> well, being able to, and being legally allowed to, are different things.. is the lgpl-ness of glibc sufficient to shield all programs from GPL's "linking" clause (for using the hurd servers)?
wolfgangyes, it is enough.  you can even communicate with the Hurd servers directly, since you use Remote Procedure Calls to communicate wit them.  so there is no linking involved.
wolfgangok, back to the original topic: the arbitrary limitations of Unix programs and how GNU wants to do better
wolfgangin fact, the whole design of the Hurd is based on the idea of not imposing arbitrary limitations on users
wolfgangso if you have an ISO-image of a cd-rom, you can "loopback-mount" the cd as the user without needing special permission.  that is no problem, since the iso9660fs-server will run with your user-id.  it is just a program that you started.
wolfgangbut you can do far more than just that.
wolfgangin fact, you can change all aspects of the system as you like.  you can create your own world, using POSIX-components where you like and your own components otherwise.
wolfgangwe have a question:   <sarnold> are there security problems with allowing users to modify the filesystem namespace? or is the user performing the mount the only user who can see the newly added filesystem mount?
wolfgangthere is a lot i could say about that :)
wolfgangand he goes on:   <sarnold> if so, what happens if two users both try to mount to the same mount-point? (well, that sounds like trouble anyway...)
wolfgangi will answer the second question first, as that is easier :)
wolfgangyou can only "mount" something on a node that you own.  so two users trying to use the same node is impossible
wolfgangthat partially answers the first question even.
wolfgangyou can only use that in your home directory (or in places like /tmp or /var/tmp of course).  but that is not a restriction, since you can also start your own copy of the complete Hurd, so you have your own root file system (which others would not see) which you can modify as you like
wolfgangwe've got a short interruption here:   <Arador> and can you mount something (a iso image in loop device for example) for N users?
wolfgangi am not aware of any simple way to do that currently.  conceptionally, it is definitely possible if you setup your own authentication server.  but that is some work.  but it is possible.
wolfgangsimplifying everything that anyone might ever want to do is a task we will start to work on at some point in the future ;)
wolfgangback to the question about security issues.
wolfgangsince you can put arbitrary stuff in the part of the file system that you own, you might be able to get someone into a trap if he accesses your part of the file system.  for example, if you put a file system in your homedir that is purely virtual (think of /proc on GNU/Linux) and creates an endless directory tree dynamically, it might be hard for the admin to remove your home diretory when he deletes your account. ;)
wolfgangso he would have to remove all your own file systems first.
wolfgangif he does that, all is fine.
wolfgangthat is a simple fact that you have to pay when you allow users to change their environment.  people just need to be aware of the fact that it is possible to change the environment.
wolfgangbut i guess a person who does not such a basic thing about the system better should not administrate a server with multiple users anyway. :)
wolfganga question:   <sarnold> is there an easy way for the sysadmin to prevent users from mounting new filesystems, to prevent someone from doing while true ; do mount ; done ?
wolfgangif you start a file system server, it runs as a process of you.  so this question is basically the same as "can the admin stop the users from starting a lot of processes".  and of course that is possible.  it is even possible on Unix to do that.  i am not sure inhowfar it is implemented on GNU/Hurd yet, though.
wolfgangif want to _generally_ prevent your users from using their own servers, that is very easy.
wolfganguse a file system for /home that does not support this.  you can create such a file system very easiely.  in fact, some people do so by accident when installing Debian GNU/Hurd and then wonder why some stuff does not work ;)
wolfgangso, GNU/Hurd tries to not impose limits on the user if that can be avoided.  it is worse enough that the hardware is limited, why should we add additional restrictions in the software? :)
wolfgang(except for the cases where we _want_ to limit things on purpose for security reasons)
wolfgangand there is another very cute aspect of the system: the Unix philosophy says that one should write small and simple programs which can be combines flexibly.  that is how it was done in the Hurd; the Unix kernel in fact violates this principle, as it does scheduling, hardware support, file systems, network protocols and lots of other stuff
wolfgangthat does not mean that the designers of Unix were stupid, of course :)  they were actually very clever
wolfgangthey had to design Unix for computers that were less powerful than a typical calculator is today.  so it was simply necessary to do it that way
wolfgangin the Hurd, we think that now it is time to rethink these old decisions, since so much has changed since then.
wolfgangback than, user-defined file systems were not feasable at all, so nobody asked for it.  but today, everywone wants them, and their are various approaches to providing them.
wolfgangthe GNOME-vfs is one example. KDE's ioslaves are another.  libferris is yet another
wolfgangall these have something in common: they are doing things in a way that limits their usefulness: you have to write your programs to make use of them.  existing programs won't benefit
wolfgangand that is the major advantage of the Hurd: we do it at the file system level, so you do not need to modify any POSIX application to enable it to benefit from the features of the Hurd!
* wolfgang finds this so exciting
wolfgangok, now some more concrete examples
wolfgangsure, we do have file systems like ext2fs, ufs and fatfs.
wolfgangand additionally to these stored file systems, we also have network file systems like nfs and ftpfs
wolfgangthe latter is very nice.  you can just do "tail -n 2 /ftp/ftp.debian.org/pub/welcome.msg" and stuff like that.
wolfgangsome people seem to object to that, arguing "some operations like appending to a file will be terribly inefficient over ftp".  that is true, but if you consider that a problem, don't use this feature. :) often, it is useful to have it, though.
wolfgangwe have a question:    <Arador> how does ftpfs handles things such as "password incorrect" or "timeout" to the POSIX applications?
wolfgangwell, additionally to these file systems, we can also have virtual ones like GNU/Linux has /proc and devfs
wolfgangbut there is far more than that.
wolfganga server can provide just a single node, like /dev/null or /dev/random.
wolfgangand we even have one particular cute one: the "run" translator.  (oh, i almost forgot to mention that servers that reside in the file system are also called translators)
wolfgangwhen starting "run", you provide it with a shell command.  whenever you open the file where "run" is sitting, it will execute that command, and when you then read from it you will get the output of that command.
wolfgangso you can tell it to execute "fortune", every "cat foo" will display a new fortune cookie.
wolfgang(that can be used to generate random signatures for emails - or for whatever you can think of.)
wolfgang     <vegai> wolfgang: in that example, 'foo' is a translator, right?    <vegai> the run-translator, that is
wolfgangyes, it is the node where the run translator sits, i.e. the "mountpoint"
wolfgangall that may be nice, but there are still far more possibilities!
wolfganga translator does not need to implement the file system protocol.  it can implement any protocol.
wolfgangfor example, the IP stack implements the socket interface, obviously
wolfgang   <sarnold> does the translator run with the privs of whoever ran "run" or whoever performs the read(2)?
wolfganga translator always runs with the priviledges of the owner of the node which it translates (the "mountpoint")
wolfgangso the permissions need to be right, as always.
wolfgangthere is a simple reason for that.
wolfgangif iso9660fs translates /cdrom (or /mnt/cdrom if you prefer), then it needs to access /dev/cd0.  same for any other file system: if you have an ext2fs on /var, that server needs to be able to write to e.g. /dev/hd0s3.  and of course users should not be able to use this directly.
wolfgangok, the last thing i mentioned was the IP stack, which provides the socket interface (and is available at /servers/socket/inet and - if you want to go by protocol number instead of name - /servers/socket/2).
wolfgangof course you are not limited to the interfaces that the Hurd uses.  you can use your own interfaces, and just use the file system as namespace for the initial handshake between a server and its users.
wolfgangjust think for yourself a bit about what you can do with all that.  i am sure you will be able come up with some nifty ideas.  no matter whether they are virtual file systems, single nodes or something completely different
wolfganga question:     <vegai> what about language independence? Is C the only choice for coding translators?
wolfganglong ago, someone has written a module for writing translators in perl (and implemented one with it).  later, i wrote a module that enables you to write translators in Ruby (and i implemented a translator with it, but not a useful one ;-)).
wolfgangbut in general, a lot of work is still needed to make it convenient to write arbitrary translators in any language.
wolfgangi am very interested in that myself, but currently other things are certainly more urgent by far
wolfgangso if anyone is interested in working on that, don't hesitate to contact me.
wolfgang   <sarnold> if you don't mind (heh heh, you must be tired of me :) what tops the list of what needs doing?
wolfgangi am not sure if that list fits into memory :)
wolfgangwell, i think we have some lists online even, wait a second
wolfganga few very urgent things are listed at http://hurd.gnufans.org/bin/view/Hurd/GNUHurdStatus
wolfgangwe have here a very interesting question:    <mentor> AFAI can see: essentially HURD translators/servers provide a service in a different context (processor context, security context, and any other contexts the microkernel maintains); would it ever be considered useful to implement services in such a way that specfic contexts can be chosen for segregation?
wolfgangwell, translators are far more than that :) then enable you to change your environment as you like (and experienced users usually want to change their working environment to fit their needs better), but sure, the seperation certainly is also a point.  however, i am not sure a) how would you propose could be implemented at all, no matter whether in the Hurd or elsewhere, and b) what would be the advantage of that approach.
wolfgangok, then i will just give on more example of a cool feature.  and a very new feature in fact
wolfgangthe new console implementation
wolfgangnow, we have a console server (a translator) that provides a directory for every virtual console.
wolfgangyou can attach a console client to it which sends input to the "input" file in the directory of a virtual console, and gets the contents of the display from the file "display" in the same directory
wolfgangthe client does not need to poll the data from the display: it just requests change notifications, a feature that is provided also by normal stored file systems like ext2fs.  that might be quite interesting for implementing an Intrusion Detection System, BTW.
wolfgangthe nice thing about this console implementation is that you can attack multiple clients to the same server
wolfgangso you can work at a computer, then go to another computer, ssh over the network to the first one and be able get your original consoles back - all of them.
wolfgangi don't think i need to mention that the console supports unicode everywhere etc.
wolfgangi think that the new console is a very nice example for how the Hurd design can be used to implement new powerful stuff.
wolfgangok, now i will conclude by referring to http://hurd.gnu.org/ , http://www.debian.org/ports/hurd , http://hurd.gnufans.org/ and of course http://hurd.es.gnu.org/ for further information.  any more questions?
* wolfgang could keep talking about the Hurd for several days :)
wolfgang     <vegai> I'm under the impression, that the current microkernel is limited in several ways, and it's being replaced by L4. What will this cause to the current Hurd?
wolfgangMach was a first-generation microkernel, so it is certainly not perfect.
wolfgangindeed, there are plans to switch to L4 at some point in the future, but we are far away from that.  the Hurd is cutting-edge even when running on Mach ;)
wolfgangfor the Hurd, it will mean that it will become better, hopefully.  and we will have to change some Mach-specific parts.  fortunatly, we depend on Mach-semantics in very few places.
* jmgv thinks wolfgang need a breathle ;-)
bunnyso...
bunnyGNU/Hurd be part of it ;)
bunny#hurd the channel, #hurd-bunny the underground channel ;)
sarnoldok, i think it is probably time to move onto our next speaker, xtingray, who will talk about php and flash :)
sarnoldI'd like to thank wolfgang for his extreme patience in answering my questions :)
bunnyand me for bringin him here ;D
wolfgangwe're used to being patient in the Hurd =)
jmgvso we will consider this talk finish
sarnoldI'd also like to that tiri, garoeda, and arador, for trnaslating this talk into dutch and spanish :)
jmgvclap clap clap clap clap
jmgvclap clap clap clap clap
wolfgang:)
bunnyand me?
bunny=(
sarnoldbunny: yes, thanks to you too :)
jmgvplas clap plas clap plas clap
wolfgangbunny: thank you for bringing me here

Generated by irclog2html.pl 2.1 by Jeff Waugh - find it at freshmeat.net!