๐ Ohayo! I'm Arignir, a Infosec, Kernels, Emulators and C enthusiast.
I'm currently working on Hades, A Nintendo Game Boy Advance Emulator ๐ฅ.
A hand-made SMP-aware kernel
License: GNU General Public License v2.0
๐ Ohayo! I'm Arignir, a Infosec, Kernels, Emulators and C enthusiast.
I'm currently working on Hades, A Nintendo Game Boy Advance Emulator ๐ฅ.
Necessary for a shell.
When an exception occurs in ring 0, the kernel should panic.
The main reason behind that is that we don't know in which state the kernel was before the exception, and therefore we don't know what to do, which locks to unlock, which buffers are corrupted and which ones are not, etc.
An exception handler can check if the previous code was running in ring 0 by looking at the value of iframe->cs
. If it's equals to KERNEL_CODE_SELECTOR
, then the code was in ring 0. Otherwise, it was probably in ring 3.
The dumb filesystem has been started, but is not finished yet.
I think it would be better to finish it before starting the FAT filesystem.
Most functions in kernel/fs.c should have their syscall equivalent, calling them.
Lock primitives (spinlock
, mutex
, semaphore
, rwlock
) should all have their is_locked()
function.
This could be used in debugging assertions to make sure some golden rules are respected all along the kernel (lots of functions are assuming that some datas are already locked etc.).
Biggest beneficiaries are the vaspace_*
functions. They assumes current thread and current virtual address space are both locked as writers. If they aren't, undefined behavior may occur.
The FAT filesystem is a common and easy-to-implement filesystem. Having one is mandatory.
Buffers (and any information) given by the user in syscalls should be verified.
This means:
A program is not allowed to segfault when running in ring 0 (the kernel should panic), so ensuring these buffers are valid is a necessity.
Virtual filesystems are the peak of a finished kernel !
Adding /proc
and /dev
would be neat.
These syscalls are:
Implementation is unspecified yet.
This issue can be used as an open debate on how these syscalls may work.
The most important one are:
echo
, ls
, rm
, mkdir
etc.)Virtual segments (struct vseg
) need flags to identify if they are readonly, executable, userspace etc.
These flags should be used by vseg_grow()
and forwarded to mmap()
and munmap()
so new pages of growing segments have the flags they deserve.
In the same way, vaspace_new_vseg()
should set these flags.
A possible implementation would be to add a field of type mmap_flags_t flags
within the structure vseg
.
This mostly concerns syscalls.
Necessary for a shell
When an exception occurs in ring 0, the kernel should kill the current thread.
Currently, kernel's printf()
outputs on the screen using the vga buffer. But the vga buffer is limited to 80*25 chars and the current implementation doesn't handle scrolling yet. So any long output cannot be seen completely.
A possible solution is to make printf()
output to the serial ports instead. Debug will only be visible to ChaOS developers using virtual machines or connecting their computer to a debugging system, and user-friendly messages can always be printed on screen using the tty (currently not implemented) or directly with vga_puts()
.
A PS/2 driver would be neat.
The driver should be as complete as possible, handle errors/unimplemented features properly and store the keys in an internal buffer that can be given to the tty later.
These syscalls are:
open()
read()
write()
close()
Implementation is unspecified yet.
This issue can be used as an open debate on how these syscalls may work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.