1. 30 Mar, 2018 2 commits
  2. 04 Dec, 2017 2 commits
    • Jonas Termansen's avatar
    • Jonas Termansen's avatar
      Fix SEEK_END, file offset overflow, and read/write/mkpartition syscall bugs. · 568c97c7
      Jonas Termansen authored
      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.
      568c97c7
  3. 20 Aug, 2017 2 commits
  4. 10 Jul, 2017 1 commit
  5. 02 Jul, 2017 1 commit
  6. 14 Jun, 2017 1 commit
  7. 12 Jun, 2017 1 commit
  8. 21 May, 2017 1 commit
  9. 18 May, 2017 1 commit
  10. 15 May, 2017 1 commit
  11. 18 Apr, 2017 1 commit
  12. 12 Apr, 2017 2 commits
  13. 08 Apr, 2017 2 commits
  14. 03 Apr, 2017 1 commit
  15. 19 Mar, 2017 1 commit
  16. 26 Feb, 2017 2 commits
  17. 25 Feb, 2017 1 commit
  18. 19 Feb, 2017 2 commits
  19. 18 Feb, 2017 1 commit
  20. 14 Feb, 2017 2 commits
  21. 13 Feb, 2017 2 commits
  22. 22 Jan, 2017 2 commits
  23. 29 Dec, 2016 1 commit
  24. 27 Dec, 2016 1 commit
    • Jonas Termansen's avatar
      Revert "Add <limits.h>." · 0cf88fd5
      Jonas Termansen authored
      This reverts commit f6cde2d7.
      
      gcc detected this header existing and emitted its own limits.h that
      included the libc limits.h. This caused the #include_next chain to reach
      the end and including the header failed.
      
      Undoing this commit for now until the compiler toolchain is updated to
      avoid this problem.
      0cf88fd5
  25. 27 Nov, 2016 4 commits
  26. 23 Nov, 2016 2 commits
    • Jonas Termansen's avatar
      Add pseudo terminals. · b38c8485
      Jonas Termansen authored
      This is a compatible ABI change riding on the previous commit's bump.
      b38c8485
    • Jonas Termansen's avatar
      Detect whether the terminal has a display and a keyboard layout. · 6ef5a5ce
      Jonas Termansen authored
      A new ioctl TIOCGDISPLAYS allow detecting which displays the terminal
      has associated. The ability to set a keyboard layout can be detected
      with tcgetblob kblayout.
      
      Improve the user-space multi-monitor support while here.
      
      The kernel now sets TERM rather than init(8).
      
      This is a compatible ABI change riding on the previous commit's bump.
      6ef5a5ce