| Age | Commit message (Collapse) | Author |
|
|
|
+ Processes won't be able to read previous stack frames etc
|
|
|
|
|
|
+ Now each shared region is reference counter (technically each region
is refernce counted, private regions just have a count of 1).
Also, syscalls that touch the TLB get flushed, but should probably
look into where else this flushing might be needed.
|
|
|
|
+ Remove sys_kill() as we should be using a two-stage process where a
thread is first orphaned by sys_detach(), and then the thread itself
calls sys_exit() after it has done all necessary cleanup in init.
|
|
+ A reserved area is an area at the start of the region that should not
be used unless explicitly asked for, for example null pages.
As such, a small correction to my previous commit message: There's no
danger in not locking req_mem() etc, as a null page will only be
allocated when explicitly asked for.
|
|
+ User has to 'free' the 0 page before it becomes accessible to mapping.
Probably worth noting that this is likely VERY niche and mainly
concerns stuff like certain kinds of emulators that I'm still
eons from implementing, but still.
Unbacked pages can also be useful for some kinds of notifications,
like 'if someone writes to this page, please report it to me with this
ID' or whatever, I remember seeing some discussion about it somewhere
but that's also not really relevant for the moment.
Most significantly, at least with the current design,
after the null page is freed it becomes available for use to regular req_mem()
calls, so users should probably using locks around memory requests.
That's probably a good idea anyway as internally the kernal has to
lock the virtual memory, and without a scheduler it might cause
threads to spin for a while in the kernel which is rather bad.
|
|
+ Can be used to pass contiguous memory regions to things like virtio
block devices for implementing disk drivers etc.
|
|
+ No real point having multiple different levels of assertions, just say
you assert something and be done with it
|
|
|
|
+ The system is now a bit simpler and hopefully easier to understand, while also
extending the shared memory to be 1:N, where there is one owner who
may become a zombie while waiting for the N to die.
|
|
|
|
+ Took some fairly significant changes, for one the kernel is no longer
relocated at the start of a boot, instead it sits wherever the user
decides the kernel should sit. Similarly, the initial kernel stack and
page table are stored within the binary, slightly bloating the size
but making it much safer to boot since there's really no chance of us
overwriting the fdt or initrd in memory.
|
|
+ I keep starting to type src and wondering why autocomplete won't work,
I guess src is just uncounciously a better name
|