Age | Commit message (Collapse) | Author |
|
Apparently a VLA of zero size is undefined behavior.
|
|
|
|
Due to buggy edge cases it caused logic bugs which caused stack
overflows. There should be no need to make any additional checks after
the table was created anyways so it is better to just skip it.
|
|
|
|
Easier to add formatted strings to the string builder without
using intermediate buffers.
|
|
This removes edge cases from read calls and makes bugs harder
to introduce.
|
|
This commit also add braces to all `if` statements.
|
|
|
|
|
|
Userland can now interface with processes by writing/reading from
`/proc/<pid>/<entry>`
It can send signals, for example `echo 15 > /proc/1/signal`
|
|
|
|
This makes write/read calls that use strings to communicate much
simpler and less error prone.
|
|
Like snprintf but without null termination
|
|
This makes it easier to write and read from /dev/clock using shell
scripts. The actual performance decrease will be minimal and the
interface is not that perfect for proper time keeping anyways.
|
|
After making this change I am now actually doubting if using
C strings is a good idea and maybe it should just always just the
string view library that userland makes use of.
But old code and the upcoming commits rely upon this so it is a change my
future less lazy self will do.
|
|
|
|
Previously it was possible for fragmentation to occur and as a result
certain allocations would have a linear virtual address space but not a
linear physical address space. This is bad since a lot of calls to
kmalloc_align rely upon both being linear, it has now been changed such
that all allocations done by kmalloc_align now guarantee this mapping
holds for both virtual and physical addresses.
It was due to oversight and sheer luck that this had been working for so
long.
|
|
The commit is self explanatory. It was a simple mistype that went
unnoticed for a while.
|
|
O_TRUNC as a mode does not seem to imply write permissions
but we still wish to truncate the file before giving back a file
descriptor. Therefore the kernel can now override any permission checks
if it wishes to do a truncation while still using the "ordinary path".
|
|
|
|
|
|
|
|
It seems to work completely now, but it is still very messy.
|
|
Having min/max be functions was a stupid decision in the first place
|
|
Incomplete but still very cool
|
|
|
|
Any blocks with the value zero appear to indicate a region completly
filled to zeros.
I don't see this anywhere in the spec but it does make sense and the
behavior matches files that I have on my FreeBSD machine so I guess it
must be valid.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is not useful since 99% of the time I will have access to the
serial output. But it does look cool.
|
|
|
|
|
|
|
|
`get_page` is a horrible multipurpose function and at this point I am
unsure what behavior I expect and have expected it to produce. Refactor
should probably be done soon.
|
|
This avoids creation of new buffers and unnecessary memcpys. The old
interface still exists for UDP but will be removed when I am less lazy.
From testing it does not appear to have any performance improvement but
this is most likely due to other bottlenecks as extra copies should
always be worse.
|
|
|
|
|
|
Adds support for shebangs (#!) that allow for things such as shell
scripts without appending `sh` before the file.
|
|
I appear to have assumed that len would always be the number requested
not the number left to be read. Therefore to get the number of bytes
left ot read I did `len - rc` but the `- rc` was already accounted for
by line 298.
|
|
|
|
Current method is also really bad since it uses multiple copies when it
should instead just copy to the send buffer of the network card
directly. But I have other things that I want to prioritize first.
|
|
|
|
This will scan for possible overflows in the program. It is a somewhat
expensive operation but really useful for debugging.
|
|
|