summaryrefslogtreecommitdiff
path: root/Kernel
AgeCommit message (Collapse)Author
2019-06-02AK: Add implicit String -> StringView conversionRobin Burchell
And tidy up existing view() users.
2019-06-02Boot: Let's start GRUB with no timeout.Andreas Kling
2019-06-02FileSystem: Rename VFS::fchmod() -> chmod().Andreas Kling
2019-06-02FileSystem: Route chown() and fchown() through VFS for access control.Andreas Kling
2019-06-02FileSystem: Only retrieve inode metadata once in VFS::chown().Andreas Kling
2019-06-02Kernel: Rename OffsetDiskDevice to DiskPartitionConrad Pankoff
2019-06-02Kernel: Rename offset parameter of OffsetDiskDevice to block_offsetConrad Pankoff
2019-06-02Kernel: Add DISK_SIZE option to sync.shConrad Pankoff
2019-06-02Kernel: Implement OffsetDiskDevice to prepare for partition supportConrad Pankoff
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.
2019-06-02Kernel: Memory-mapped files now have the absolute path as their name.Andreas Kling
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.
2019-06-02Kernel: Make better use of the multiboot info.Andreas Kling
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().
2019-06-02Kernel: Add comment block about File, taking some from Device.Andreas Kling
2019-06-01Kernel: Add fchown() syscall.Andreas Kling
2019-06-01Kernel: Make File::absolute_path() const.Andreas Kling
2019-06-01FileSystem: Don't create a temporary FileDescriptor every time we stat().Andreas Kling
Instead, move the stat buffer population into InodeMetadata so we can call it directly from VFS::stat() once we have an Inode.
2019-06-01FileSystem: Make Inode::lookup() take a StringView.Andreas Kling
This avoids a lot of String allocation during path resolution.
2019-06-01VM: Get rid of KernelPagingScope.Andreas Kling
Every page directory inherits the kernel page directory, so there's no need to explicitly enter the kernel's paging scope anymore.
2019-06-01Kernel: Set the absolute path as name for executable regions.Andreas Kling
2019-06-01FileSystem: Remove now-unused Inode::parent() and Inode::reverse_lookup().Andreas Kling
These were only used to implement the old path resolution algorithm.
2019-06-01VM: Always flush TLB for kernel page directory changes.Andreas Kling
Since the kernel page directory is inherited by all other page directories, we should always flush the TLB when it's updated.
2019-06-01VM: Don't remap each Region page twice in page_in().Andreas Kling
page_in_from_inode() will map the page after reading it from disk, so we don't need to remap it once again.
2019-06-01Terminal: Settings windows can be opened multiple timesChristopher Dumas
2019-06-01Terminal: Audible vs Visible beep optionChristopher Dumas
2019-05-31FileSystem: Pass mode_t to Inode::add_child().Andreas Kling
This way the Ext2FS code can update its directory entry "file type" fields correctly based on the file mode. This fixes some e2fsck whining.
2019-05-31Update Badge<T> instantiations to simply be {}.Andreas Kling
2019-05-31FileSystem: VFS should require Badge<Device> for device registration.Andreas Kling
2019-05-31FileSystem: Don't expose VFS::root_inode().Andreas Kling
It seems like we don't need to expose this anymore, it's only used by VFS internally to construct the root custody.
2019-05-31FileSystem: Rename VFS::resolve_path_to_custody() => resolve_path().Andreas Kling
2019-05-31FileSystem: Reuse existing custodies when possible, and keep them updated.Andreas Kling
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.
2019-05-31Kernel: Discard a process's ELFLoader on finalization.Andreas Kling
We don't need after that point, and throwing it out might free up some cached data used for backtraces.
2019-05-31Kernel: Process finalization should release cwd and executable custodies.Andreas Kling
Since Process destruction happens with interrupts disabled, it's not safe to still hold custodies at that point. Drop them in finalization.
2019-05-31Kernel: Do a bit more of do_exec() before disabling interrupts.Andreas Kling
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.
2019-05-31FileSystem: Merge symlink following logic into path resolution.Andreas Kling
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.
2019-05-30Kernel: The stat() syscall should follow symlinks.Andreas Kling
2019-05-30FileSystem: Get rid of VFS::resolve_path().Andreas Kling
The only remaining client was resolve_symbolic_link() which now deals in custodies instead.
2019-05-30FileSystem: Get rid of VFS::absolute_path() and teach Mount about custodies.Andreas Kling
2019-05-30FileSystem: Get rid of VFS::resolve_path_to_inode() and old_resolve_path().Andreas Kling
2019-05-30Kernel: Rename Process::cwd_custody() to Process::current_directory().Andreas Kling
...and executable_custody() to just executable().
2019-05-30FileSystem: Port most of the code over to using custodies.Andreas Kling
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.
2019-05-30FileSystem: Add a Custody class that represents a parent/child guardianship.Andreas Kling
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.
2019-05-30Kernel: Make the Process allocate_region* API's understand "int prot".Andreas Kling
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.
2019-05-30Kernel: Make fcntl(F_SETFL) actually update the append/blocking flags.Andreas Kling
2019-05-30Kernel: Add InodeFile, a File subclass for regular files.Andreas Kling
Finally everything that can be held by a FileDescriptor actually inherits from the File class.
2019-05-30Kernel: Pass 'prot' argument to File::mmap() and act on it.Andreas Kling
Nothing crazy, this just means that PROT_READ allocates readable regions, and that PROT_WRITE allocates writable ones.
2019-05-30Misc: Add a simple init processRobin Burchell
This doesn't do much right now, just fork off a bunch of stuff and set priorities.
2019-05-30Kernel/LibC: Implement sched_* functionality to set/get process priorityRobin Burchell
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.
2019-05-30Kernel: Fix a bad printf, and stub out SO_ERROR a bit more fullyRobin Burchell
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.
2019-05-28Add clang-format fileRobin Burchell
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.
2019-05-28Kernel: Remove accidentally committer .orig file.Andreas Kling
2019-05-27tiled backgrounds no longer has strange off-by-one pixel errorsChristopher Dumas