Terminal is still missing some ANSI codes, cursor and pseudo terminal
support.
Shell's builtin start-gui now launches a Terminal instead of test
windows.
When a unix domain socket is closed and it has a connection to another
socket, it will make the other socket readable and recv will return 0.
This allows detection of socket closing
This made pwd.cpp require libstdc++ which meant that getlogin() also
needed libstdc++. This made build process of libstdc++ require itself
which is of course not possible.
Current implementation can create custom windows and each window has
its own framebuffer. When window wants to write its framebuffer to the
screen it will send a message to the WindowServer using unix sockets.
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.