mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
No description
568c97c77f
Fix SEEK_END seeking twice as far as requested. Centralize lseek handling in one place and avoid overflow bugs. Inode lseek handlers now only need to handle SEEK_END with offset 0. Prevent the file offset from ever going below zero or overflowing. Character devices are now not seekable, but lseek will pretend they are, yet always stay at the file offset 0. pread/pwrite on character devices will now ignore the file offset and call read/write. This change prevents character devices from being memory mapped, notably /dev/zero can no longer be memory mapped. None of the current ports seem to rely on this behavior and will work with just MAP_ANONYMOUS. Refactor read and write system calls to have a shared return statement for both seekable and non-seekable IO. Fix file offset overflow bugs in read and write system calls. Fix system calls returning EPERM instead of properly returning EBADF when the file has not been opened in the right mode. Truncate IO counts and total vector IO length so the IO operation does not do any IO beyond OFF_MAX. Truncate also total vector IO length for recvmsg and sendmsg. Fail with EINVAL if total vector IO length exceeds SSIZE_MAX. Don't stop early if the total IO length is zero, so zero length IO now block on any locks internal to the inode. Handle reads at the maximum file offset with an end of file condition and handle writes of at least one byte at the maximum file offset by failing with EFBIG. Refactor UtilMemoryBuffer to store the file size using off_t instead of size_t to avoid casts and keep file sizes in the off_t type. Properly handle errors in the code, such as failing with EROFS instead of EBADF if the backing memory is not writeable, and failing with EFBIG if writing beyond the end of the file. Fix mkpartition not rejecting invalid partition start offsets and lengths. Strictly enforce partition start and length checks in the partition code. Enforce partitions exist within regular files or block devices. Fix a few indention issues. |
||
---|---|---|
bench | ||
build-aux | ||
carray | ||
disked | ||
dispd | ||
doc | ||
editor | ||
ext | ||
games | ||
hostname | ||
init | ||
kblayout | ||
kblayout-compiler | ||
kernel | ||
libc | ||
libm | ||
libmount | ||
login | ||
mkinitrd | ||
regress | ||
sf | ||
sh | ||
share/man | ||
sysinstall | ||
tix | ||
trianglix | ||
update-initrd | ||
utils | ||
.gitignore | ||
LICENSE | ||
Makefile | ||
README |
The Sortix Operating System =========================== Sortix is a small self-hosting operating-system aiming to be a clean and modern POSIX implementation. It is a hobbyist operating system written from scratch with its own base system, including kernel and standard library, as well as ports of third party software. It has a straightforward installer and can be developed under itself. Releases come with the source code in /src, ready for tinkering. It has been in development since 2011 by a single developer and contributors. Though the system is stable and capable right now, it is still early in development, and a number of crucial features haven't been made yet. Releases are made yearly and future releases will add features such as networking, SMP, and USB that were skipped in favor of becoming self-hosting now. Documentation ------------- The system is documented as manual pages. Introductory system usage is covered in the user-guide(7) manual page. Links ----- For more information, please visit the official website: https://sortix.org/ Building Sortix --------------- Development of Sortix under itself is covered in development(7). Development from another operating system is covered in cross-development(7). You can view the cross-development(7) manual page with this command: man share/man/man7/cross-development.7 License ------- Copyright 2011-2016 Jonas 'Sortie' Termansen and contributors. Sortix is free software licensed under the ISC license as described in the LICENSE file. It also contains permissively licensed code from other projects.