Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-09-07 | Kernel: Store process names as KString | Andreas Kling | |
2021-09-07 | Kernel: Make UserOrKernelBuffer return KResult from read/write/memset | Andreas Kling | |
This allows us to simplify a whole bunch of call sites with TRY(). :^) | |||
2021-09-06 | Kernel: Wrap two VirtualFileSystem directory traversals in TRY() | Andreas Kling | |
2021-09-06 | Kernel: Wrap ISO9660FS directory traversal in TRY() | Andreas Kling | |
2021-09-06 | Kernel: Use TRY() in TmpFSInode::write_bytes() | Andreas Kling | |
2021-09-06 | Kernel: Make KString factories return KResultOr + use TRY() everywhere | Andreas Kling | |
There are a number of places that don't have an error propagation path right now, so I've added FIXME's about that. | |||
2021-09-06 | Kernel: Make KBufferBuilder::append() & friends return KResult | Andreas Kling | |
This allows callers to react to a failed append (due to OOM.) | |||
2021-09-06 | Kernel: Use KResultOr and TRY() for {Shared,Private}InodeVMObject | Andreas Kling | |
2021-09-06 | Kernel: Improvements to Custody absolute path serialization | Andreas Kling | |
- Renamed try_create_absolute_path() => try_serialize_absolute_path() - Use KResultOr and TRY() to propagate errors - Don't call this when it's only for debug logging | |||
2021-09-06 | Kernel/Ext2FS: Wrap calls to traverse_as_directory() in TRY() | Andreas Kling | |
Nothing says we can't TRY() a multi-line function call. :^) | |||
2021-09-06 | Kernel: Use TRY() more in Plan9FS | Andreas Kling | |
2021-09-06 | Kernel: Tidy up Plan9FS construction a bit | Andreas Kling | |
2021-09-06 | Kernel: Tidy up Ext2FS construction a bit | Andreas Kling | |
2021-09-06 | Kernel: Tidy up SysFS construction | Andreas Kling | |
- Use KResultOr and TRY() to propagate errors - Check for OOM errors - Move allocation out of constructors There's still a lot more to do here, as SysFS is still quite brittle in the face of memory pressure. | |||
2021-09-06 | Kernel: Tidy up DevFS construction and handle OOM errorso | Andreas Kling | |
- Use KResultOr and TRY() to propagate errors - Check for OOM - Move allocations out of the DevFS constructor | |||
2021-09-06 | Kernel: Tidy up DevPtsFS construction and handle OOM errors | Andreas Kling | |
- Use KResultOr and TRY() to propagate errors - Check for OOM when creating new inodes | |||
2021-09-06 | Kernel: Tidy up TmpFS and TmpFSInode construction | Andreas Kling | |
- Use KResultOr<NonnullRefPtr<T>> - Propagate errors - Use TRY() at call sites | |||
2021-09-06 | Kernel: Use TRY() in ISO9660FileSystem | Andreas Kling | |
2021-09-06 | Kernel: Simplify WatchDescription::create() | Andreas Kling | |
2021-09-06 | Kernel: Use TRY() some more in FileDescription | Andreas Kling | |
2021-09-06 | Kernel: Use TRY() in BlockBasedFileSystem | Andreas Kling | |
2021-09-06 | Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe | Ali Mohammad Pur | |
2021-09-05 | Kernel: Make all Spinlocks use u8 for storage, remove template | Brian Gianforcaro | |
The default template argument is only used in one place, and it looks like it was probably just an oversight. The rest of the Kernel code all uses u8 as the type. So lets make that the default and remove the unused template argument, as there doesn't seem to be a reason to allow the size to be customizable. | |||
2021-09-05 | Kernel: Use TRY() in DevFSLinkInode::write_bytes() | Andreas Kling | |
2021-09-05 | Kernel: Use TRY() in ProcFS | Andreas Kling | |
2021-09-05 | Kernel: Make FileSystem::get_inode() return KResultOr<NRP<Inode>> | Andreas Kling | |
This allows for natural error propagation in a bunch of new places. | |||
2021-09-05 | Kernel: Make copy_{from,to}_user() return KResult and use TRY() | Andreas Kling | |
This makes EFAULT propagation flow much more naturally. :^) | |||
2021-09-05 | Kernel: Use TRY() in FileDescription::attach() | Andreas Kling | |
2021-09-05 | Kernel: Use TRY() in Inode | Andreas Kling | |
2021-09-05 | Kernel: Use TRY() in FIFO | Andreas Kling | |
2021-09-05 | Kernel: Use TRY() in InodeFile | Andreas Kling | |
2021-09-05 | Kernel/Ext2FS: Use TRY() in the Ext2FS | Andreas Kling | |
This class was just *full* of great opportunities for TRY(). :^) | |||
2021-09-05 | Kernel: Use TRY() even more in VirtualFileSystem | Andreas Kling | |
Allowing TRY() with KResult unlocked a whole lot more opportunities. | |||
2021-09-05 | Kernel: Tidy up VirtualFileSystem::mount_root() a little bit | Andreas Kling | |
- Return KResult instead of bool - Use TRY() | |||
2021-09-05 | Kernel: Use TRY() in FileDescription | Andreas Kling | |
2021-09-05 | Kernel: Tidy up AnonymousFile construction a bit | Andreas Kling | |
- Rename create() => try_create() - Use adopt_nonnull_ref_or_enomem() | |||
2021-09-05 | Kernel: Use TRY() in VirtualFileSystem | Andreas Kling | |
2021-09-05 | AK+Kernel: Move KResult.h to Kernel/API for userspace access | sin-ack | |
This commit moves the KResult and KResultOr objects to Kernel/API to signify that they may now be freely used by userspace code at points where a syscall-related error result is to be expected. It also exposes KResult and KResultOr to the global namespace to make it nicer to use for userspace code. | |||
2021-09-05 | Kernel: Rename FileBlocker::unblock() => unblock_if_conditions_are_met() | Andreas Kling | |
Since this may not actually unblock, the old name was very confusing. | |||
2021-09-05 | Kernel: Tidy up InodeWatcher construction | Andreas Kling | |
- Rename create() => try_create() - Use adopt_nonnull_ref_or_enomem() | |||
2021-09-05 | Kernel/Plan9FS: Use KString instead of String in one place | Andreas Kling | |
2021-09-05 | Kernel/Ext2FS: Remove a String allocation in debug logging | Andreas Kling | |
We were creating a temporary String just to log the target when writing a symlink directly into inline storage. | |||
2021-09-04 | Kernel/SysFS: Ensure data stability when reading from Inodes | Liav A | |
Like with the ProcFS, description data can change at anytime, so it's wise to ensure that when the userland reads from an Inode, data is consistent unless the userland indicated it wants to refresh the data (by seeking to offset 0, or re-attaching the Inode). Otherwise, if the data changes in the middle of the reading, it can cause silent corruption in output which can lead to random crashes. | |||
2021-09-04 | Kernel/DevFS: Remove unnecessary include | Liav A | |
2021-09-03 | Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr | Daniel Bertalan | |
Our existing implementation did not check the element type of the other pointer in the constructors and move assignment operators. This meant that some operations that would require explicit casting on raw pointers were done implicitly, such as: - downcasting a base class to a derived class (e.g. `Kernel::Inode` => `Kernel::ProcFSDirectoryInode` in Kernel/ProcFS.cpp), - casting to an unrelated type (e.g. `Promise<bool>` => `Promise<Empty>` in LibIMAP/Client.cpp) This, of course, allows gross violations of the type system, and makes the need to type-check less obvious before downcasting. Luckily, while adding the `static_ptr_cast`s, only two truly incorrect usages were found; in the other instances, our casts just needed to be made explicit. | |||
2021-09-01 | Kernel: Convert UserOrKernelBuffer callbacks to use AK::Bytes | Brian Gianforcaro | |
2021-09-01 | Kernel: Pass InodeMetadata by reference in TmpFSInode::create | Brian Gianforcaro | |
This struct is non-trivially large, it makes sense to pass it by reference instead of by value in the factory method. Found by Sonar Cloud. | |||
2021-08-29 | Kernel/SysFS: Remove unnecessary mutex lockers in SysFS metadata getters | Andreas Kling | |
SysFS inodes have immutable metadata once created. | |||
2021-08-29 | Kernel: Make all ProcFS and SysFS files zero-sized | Andreas Kling | |
There is no value in exposing particular sizes for these files. | |||
2021-08-29 | Kernel: Remove an obviously redundant check in FIFO::read() | Andreas Kling | |