Age | Commit message (Collapse) | Author |
|
And tidy up existing view() users.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This implements a passthrough disk driver that translates the read/write
block addresses by a fixed offset. This could form the basis of MBR
partition support if we were to parse the MBR table at boot and create that
OffsetDiskDevice dynamically, rather than seeking to a fixed offset.
This also introduces a dependency in the form of grub. You'll need to have
32-bit grub binaries installed to build the project now.
As a bonus, divorcing Serenity from qemu's kernel loading means we can now
*technically* boot on real hardware. It just... doesn't get very far yet.
If you write the `_disk_image` file to an IDE hard drive and boot it in a
machine that supports all the basic PC hardware, it *will* start loading
the kernel.
|
|
It's generated when the mapping is first created, so it won't update if
the file moves. Maybe that's something we should support, too.
|
|
Define the multiboot info struct properly so we don't have to grab at byte
offsets in the memory access checker code. Also print kernel command line
in init().
|
|
|
|
|
|
|
|
Instead, move the stat buffer population into InodeMetadata so we can call
it directly from VFS::stat() once we have an Inode.
|
|
This avoids a lot of String allocation during path resolution.
|
|
Every page directory inherits the kernel page directory, so there's no need
to explicitly enter the kernel's paging scope anymore.
|
|
|
|
These were only used to implement the old path resolution algorithm.
|
|
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.
|
|
|
|
|