Age | Commit message (Collapse) | Author |
|
Since the kernel page directory is inherited by all other page directories,
we should always flush the TLB when it's updated.
|
|
page_in_from_inode() will map the page after reading it from disk, so we
don't need to remap it once again.
|
|
|
|
|
|
This way the Ext2FS code can update its directory entry "file type" fields
correctly based on the file mode. This fixes some e2fsck whining.
|
|
|
|
|
|
It seems like we don't need to expose this anymore, it's only used by VFS
internally to construct the root custody.
|
|
|
|
Walk the custody cache and try to reuse an existing one when possible.
The VFS is responsible for updating them when something happens that would
cause the described relationship to change.
This is definitely not perfect but it does work for the basic scenarios like
renaming and removing directory entries.
|
|
We don't need after that point, and throwing it out might free up some
cached data used for backtraces.
|
|
Since Process destruction happens with interrupts disabled, it's not safe to
still hold custodies at that point. Drop them in finalization.
|
|
We definitely need to replace m_executable before clearing interrupts, since
otherwise we might call ~Custody() which would make it assert in locking.
Also avoid calling FileDescriptor::metadata() repeatedly and just cache the
result from the first call.
I also added a comment at the point where we've decided to commit to the new
executable and follow through with the swap.
|
|
When encountering a symlink, we abandon the custody chain we've been working
on and start over with a new one (by recursing into a new resolution call.)
Caching symlinks in the custody model would be incredibly difficult to get
right with all the extra invalidation it would require, so let's just not.
|
|
|
|
The only remaining client was resolve_symbolic_link() which now deals in
custodies instead.
|
|
|
|
|
|
...and executable_custody() to just executable().
|
|
The current working directory is now stored as a custody. Likewise for a
process executable file. This unbreaks /proc/PID/fd which has not been
working since we made the filesystem bigger.
This still needs a bunch of work, for instance when renaming or removing
a file somewhere, we have to update the relevant custody links.
|
|
A custody is kind of a directory entry abstraction that represents a single
entry in a parent directory that tells us the name of a child inode.
The idea here is for path resolution to produce a chain of custody objects.
|
|
Instead of having to inspect 'prot' at every call site, make the Process
API's take care of that so we can just pass it through.
|
|
|
|
Finally everything that can be held by a FileDescriptor actually inherits
from the File class.
|
|
Nothing crazy, this just means that PROT_READ allocates readable regions,
and that PROT_WRITE allocates writable ones.
|
|
This doesn't do much right now, just fork off a bunch of stuff and set priorities.
|
|
Right now, we allow anything inside a user to raise or lower any other process's
priority. This feels simple enough to me. Linux disallows raising, but
that's annoying in practice.
|
|
links requests SO_ERROR, so in not supporting it, things were unhappy.
Supporting this properly looks a little messy. I guess Socket will need
an m_error member it sets everywhere it returns an error. Or Syscall
could set it, perhaps, but I don't know if that's the right thing to
do, so let's just stub this for now and file a bug.
|
|
Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
|
|
|
|
|
|
This could share more code with reads, and generally be better. But it works
and it's considerably faster than PIO, so let's use it. :^)
|
|
By moving the sending (and receiving) thread into the BlockedSignal state,
we ensure that the thread doesn't continue executing until the signal
has been dispatched.
|
|
- For division by zero, send SIGFPE.
- For illegal instruction, send SIGILL.
- For the rest, default to SIGSEGV.
|
|
As per the manpage, this acts as a transparent lseek() before write.
|
|
We were already handling this for the indirect blocks, but the direct ones
would happily consider #0 to be a valid block list entry.
|
|
|
|
It's good to have a place where we can try out all the different widgets.
This needs some more work on a nice layout, and should also include more
of the widgets. :^)
|
|
resized automatically
Co-Authored-By: Andreas Kling <awesomekling@gmail.com>
|
|
Also expand the QEMU VGA memory size to 64 MB, since otherwise we won't
have enough memory for double-buffering the screen.
|
|
The main cleanup here is putting the I/O address base in a member variable.
|
|
If someone wants to run without this, they can disable it manually :^)
|
|
|
|
This is in preparation for eventually using it in userspace.
LinearAddress.h has not been moved for the time being (as it seems to be
only used by a very small part of the code).
|
|
|
|
Otherwise we'll start handing out addresses that are very likely already in
use by existing ranges.
|
|
|
|
|
|
This makes the ELF symbolication crash go away while I work out a smart fix.
|
|
We were copying the raw IPv4 addresses into the wrong part of sockaddr_in,
and we didn't set sa_family or sa_port.
|