These can allocate memory that can be shared between processes using
a global key. There is currenly no safety checks meaning anyone can
map any shared memory object just by trying to map every possible key.
When printing early return message, current time was read twice. This
could lead to early return check failing, but when printing and reading
the time again subtraction overflow would happen.
Old StorageDevice::read_sectors() read each sector separately if the
underlying disk had a disk cache. This patch allows multiple sectors to
be read even if the disk cache exists and contains some of the sectors.
Only sectors that could not be found from the disk cache are actually
read from the disk. This optimization is not done for writing, which
still will write each sector separately, if disk cache has no memory to
store new sectors. It would feel kind of unnecessary optimization as you
have greater problems if disk cache cannot allocate a single page.
Only segment 0 is supported, but devices can now be accessed through
mmio.
Adding more segments would require adding argument to every PCI API so
it is left for later.
This fixes a bug where userspace provided address is not fully mapped
and the kernel tries to read/write it while using PageTable fast page.
In the future userspace input should be copied on syscall entry, so
userspace could not modify the input during syscall. Currently there
is change that userspace input passes kernel syscall validation and
after that userspace could modify the input before the value is
actually used.
Remove race condition if two acks are to be sent one after another.
Always unblock semaphore once TCP thread has done something. This
allows better chance of TCP sending to succeed.
There are multiple places in the networking code that would require
thread-safe entering to blocking mode. I should add some API for this
so that a lot of race conditions could be removed.
I had written the ICR register check backwards which lead to interrupt
handling only when it was not needed, and no handling when it was
needed. This somehow still worked, just much slower often requiring tcp
resends from the server.
README now contains simple contribution guide lines that should be
followed. I am now more open for public contributions to the repo
if people are interested.
Create a discord server and link it to the README. Discord seems to be
a nice platform for general messaging.