Announcing: Werewolf OS (Searching motivated teammembers!)
So what would you suggest? Run the kernel and drivers in ring 0, the modules in ring 1 (as in the document), skip ring 2 and run the end-user enviroment in ring 3? It does have certain limitations this way for the more advanced end-user. I was planning to get the GUI in ring 3 and keep the text-enviroment in ring 2 to have full system access when in textmode.
No - as you are specifically aiming for x86_64, run kernel code in ring 0 and user code in ring 3. Forget about the others. All your other security needs to be provided through careful choice of page privilege (user / supervisor) and certain system calls which are only available when privileged tasks are running.
Cheers,
Adam
Cheers,
Adam
There's the other problem that ring 1 or 2 (I can't remember which) is used by some hypervisors, and is defined differently in later processors (safe, because noone uses them!)
So as AJ and others said, stick with rings 0 and 3. Every other system in the world ever has only 2 privilege levels. (MIPS has 3, but only ever uses 2. The third was added for a political reason.)
So as AJ and others said, stick with rings 0 and 3. Every other system in the world ever has only 2 privilege levels. (MIPS has 3, but only ever uses 2. The third was added for a political reason.)
@DanielLavin:
and
@jeroen:
Since you're new to OS Development, I really would recommend you try it before starting any sort of project on the subject. Create yourself a little Kernel and try implementing some basic features. Get a feel for the workflow; it's vastly vastly different from game development. If you think you're the kind of guy who will get excited when kalloc() works for the first time, or you get that first context switch that prints oodles of statistics to your screen, this kind of thing might suit you. If, on the other hand, you just want to rush to the point where you have something that resembles a modern OS visually, without a care for the architecture behind your OS, maybe you'll find it difficult to find the motivation.
If you enjoy Kernel/OS design, why create an ambitious project? You probably shouldnt be wasting so much time on design at this stage; it's best to gain some experience of what works and what doesn't, first. Why not just play around with a rough kernel and experiment with ideas. I restarted my OS project countless times now; greatly improving my understanding of kernel design on each iteration.
I think many people here would agree that the best way to start off with OS Dev, is to experiment while following manuals and other resources you find on the net (or your local book store). Your project can evolve into a more defined one in time. Be patient. If you can't be patient, then you're gonna have a real hard time finding the motivation to go through with even the smallest of projects.
Good luck
Phill.
EDIT: Regarding the issues you discuss about package management in the design doc:
add:
alias install='apt-get install'
alias delete='rm -rf'
alias rename='move'
etc. to your /etc/profile file, then you can do exactly as you described:
install appname
delete folder-name
etc.
Infact, on the linux distribution I use, it has an option to remove the package, it's config files and all redundant dependencies. It even does a keyword search if it doesn't find an exact match for the package name, and let's me choose what I require.
But then again, as has already been said, the command line is for power users, who don't tend to want all this abstraction (for good reasons). Your average Joe will want to use a GUI.
Sounds to me like you might have fun creating a Linux distribution of your own by the sounds of things. Most of what you describe can be implemented and has been implemented already.
and
@jeroen:
Since you're new to OS Development, I really would recommend you try it before starting any sort of project on the subject. Create yourself a little Kernel and try implementing some basic features. Get a feel for the workflow; it's vastly vastly different from game development. If you think you're the kind of guy who will get excited when kalloc() works for the first time, or you get that first context switch that prints oodles of statistics to your screen, this kind of thing might suit you. If, on the other hand, you just want to rush to the point where you have something that resembles a modern OS visually, without a care for the architecture behind your OS, maybe you'll find it difficult to find the motivation.
If you enjoy Kernel/OS design, why create an ambitious project? You probably shouldnt be wasting so much time on design at this stage; it's best to gain some experience of what works and what doesn't, first. Why not just play around with a rough kernel and experiment with ideas. I restarted my OS project countless times now; greatly improving my understanding of kernel design on each iteration.
I think many people here would agree that the best way to start off with OS Dev, is to experiment while following manuals and other resources you find on the net (or your local book store). Your project can evolve into a more defined one in time. Be patient. If you can't be patient, then you're gonna have a real hard time finding the motivation to go through with even the smallest of projects.
Good luck
Phill.
EDIT: Regarding the issues you discuss about package management in the design doc:
add:
alias install='apt-get install'
alias delete='rm -rf'
alias rename='move'
etc. to your /etc/profile file, then you can do exactly as you described:
install appname
delete folder-name
etc.
Infact, on the linux distribution I use, it has an option to remove the package, it's config files and all redundant dependencies. It even does a keyword search if it doesn't find an exact match for the package name, and let's me choose what I require.
But then again, as has already been said, the command line is for power users, who don't tend to want all this abstraction (for good reasons). Your average Joe will want to use a GUI.
Sounds to me like you might have fun creating a Linux distribution of your own by the sounds of things. Most of what you describe can be implemented and has been implemented already.
@inph: What you said, is true. The design document is a long term plan and of course the project will start with a simple hello-world kernel. But creating my own linux distributing will take away all the fun, it's not much more then making a package compilation and setting things up. I would sure be excited if I could make the kernel print hello world, or load an external file. But I want an ambitious project because I also want to achieve something.
@JamesM, AJ, cyr1x: Okay, thanks for the info It does make it less complicated like that.
@JamesM, AJ, cyr1x: Okay, thanks for the info It does make it less complicated like that.
How about designing for a while and post your final design?
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
I will, sir, I sure will
@inph: An addition to what I said earlier, a quote of Eric Steven Raymond: "Hackers are naturally anti-authoritarian...the authoritarian attitude has to be fought wherever you find it, lest it smother you and other hackers.". That suits me a lot more then creating another Linux distro.
@inph: An addition to what I said earlier, a quote of Eric Steven Raymond: "Hackers are naturally anti-authoritarian...the authoritarian attitude has to be fought wherever you find it, lest it smother you and other hackers.". That suits me a lot more then creating another Linux distro.
Yeah, come to think of it, 'Linux distro' was a silly ideajeroen wrote:I will, sir, I sure will
@inph: An addition to what I said earlier, a quote of Eric Steven Raymond: "Hackers are naturally anti-authoritarian...the authoritarian attitude has to be fought wherever you find it, lest it smother you and other hackers.". That suits me a lot more then creating another Linux distro.
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
Hmmm......have you looked around in other sites? osdever.net for example?
Lots of tutorials there
And I agree, you should experiment first, I've made 3 kernels before the one I'm working on now, and the other 3 died because I started working on a GUI too early...
My suggestion is to get the kernel good before working on higher stuff.
-JL
Lots of tutorials there
And I agree, you should experiment first, I've made 3 kernels before the one I'm working on now, and the other 3 died because I started working on a GUI too early...
My suggestion is to get the kernel good before working on higher stuff.
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
-
- Posts: 2
- Joined: Sun Mar 16, 2008 11:49 pm
I've been thinking about the planning, and I think it's best to create a Werewolf Research project first. Just to try out stuff, and learn the stuff. Everything that we get working in the Research project could be ported to the actual OS project.
@Piranha: I've been looking around on some sites, including bona fide~, thanks anyway. The kernel is the main project for any OS, or at least should be. Without a good kernel the system won't do* much properly. I'll just have to set up another 32-bit linux to compile the 32bit files (linker etc.), but that's okay. Long live multiple partitions and the ease of debian
*edit ._.
@Piranha: I've been looking around on some sites, including bona fide~, thanks anyway. The kernel is the main project for any OS, or at least should be. Without a good kernel the system won't do* much properly. I'll just have to set up another 32-bit linux to compile the 32bit files (linker etc.), but that's okay. Long live multiple partitions and the ease of debian
*edit ._.
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
I'm compiling my 32bit kernel on a 64bit computer.
Just add flags to the compile/linker etc:
gcc -m32
ld -m elf_i386
as --32
nasm -f elf32
Works great.
-JL
Just add flags to the compile/linker etc:
gcc -m32
ld -m elf_i386
as --32
nasm -f elf32
Works great.
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io