summaryrefslogtreecommitdiff
path: root/Kernel
AgeCommit message (Collapse)Author
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
2019-05-26IDEDiskDevice: Implement basic DMA writes.Andreas Kling
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. :^)
2019-05-26Kernel: Sending a signal to yourself should block until dispatch.Andreas Kling
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.
2019-05-26Kernel: Send more specific signals when crashing due to CPU exceptions.Andreas Kling
- For division by zero, send SIGFPE. - For illegal instruction, send SIGILL. - For the rest, default to SIGSEGV.
2019-05-26Kernel: Support O_APPENDRobin Burchell
As per the manpage, this acts as a transparent lseek() before write.
2019-05-25Ext2FS: Block #0 can terminate an inode block list early.Andreas Kling
We were already handling this for the indirect blocks, but the direct ones would happily consider #0 to be a valid block list entry.
2019-05-25Ext2FS: Fix build with EXT2_DEBUG enabled, and tweak some variable names.Andreas Kling
2019-05-24Demos: Start working on a simple WidgetGallery app.Andreas Kling
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. :^)
2019-05-24Launcher loads applications from Launcher.ini, is started by default, and is ↵Christopher Dumas
resized automatically Co-Authored-By: Andreas Kling <awesomekling@gmail.com>
2019-05-24WindowServer: Add 2560x1440 resolution option.Andreas Kling
Also expand the QEMU VGA memory size to 64 MB, since otherwise we won't have enough memory for double-buffering the screen.
2019-05-24Kernel: Tidy up IDEDiskDevice a bit.Andreas Kling
The main cleanup here is putting the I/O address base in a member variable.
2019-05-23Always run QEMU with -debugcon stdio.Andreas Kling
If someone wants to run without this, they can disable it manually :^)
2019-05-23Kernel: Return ENOSYS if an invalid syscall number is requested.Andreas Kling
2019-05-23Kernel/AK: Move ELF loader to AKRobin Burchell
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).
2019-05-23Kernel: getpeername() should fail with ENOTCONN for non-connected sockets.Andreas Kling
2019-05-22Kernel: Forked children should inherit their RangeAllocator by copy.Andreas Kling
Otherwise we'll start handing out addresses that are very likely already in use by existing ranges.
2019-05-22Kernel: If a signal is ignored, make sure we unset BlockedSignal state.Andreas Kling
2019-05-22Kernel: Dump backtrace on illegal opcode exception.Andreas Kling
2019-05-21Kernel: Bump kernel stacks to 64 KB.Andreas Kling
This makes the ELF symbolication crash go away while I work out a smart fix.
2019-05-20Kernel: Add getpeername() syscall, and fix getsockname() behavior.Andreas Kling
We were copying the raw IPv4 addresses into the wrong part of sockaddr_in, and we didn't set sa_family or sa_port.