1. 15 Aug, 2018 1 commit
  2. 06 Aug, 2018 2 commits
    • Jonas Termansen's avatar
    • Jonas Termansen's avatar
      Fix <fcntl.h> including <sys/stat.h> namespace pollution. · 29555d72
      Jonas Termansen authored
      POSIX allows <fcntl.h> to include <sys/stat.h>, but doesn't require it.
      There's little reason to do that, since they are separate headers, and
      <fcntl.h> just needs the mode_t constants. Fix the code accidentally
      relying on <fcntl.h> including <sys/stat.h>. The mode_t constants are now
      provided in their own kernel header <sortix/mode.h>.
      
      Additionally fix <sys/stat.h> pulling in all of <sys/types.h>, which is not
      allowed by POSIX, which only requires a few types to be declared. Fix the
      code accidentally relying on <sys/stat.h> including <sys/types.h>.
      
      Finally fix <dirent.h> pulling in <stdint.h> through <sortix/dirent.h>.
      
      The <sortix/__/dt.h> and <sortix/__/stat.h> headers are no longer required
      and their contents have been merged into <sortix/__/dirent.h>.
      29555d72
  3. 08 Apr, 2018 1 commit
  4. 30 Mar, 2018 1 commit
  5. 04 Dec, 2017 1 commit
  6. 06 Sep, 2017 2 commits
    • Jonas Termansen's avatar
      Mix in fresh randomness when writing out /boot/random.seed. · f864c59d
      Jonas Termansen authored
      When entropy gathering is implemented, in the case of the installer and
      upgrader, the system probably won't have any entropy when it begins. By the
      time the system is installed, there will probably be a bit of entropy from
      the user using the system and general system usage, so mix in some of that.
      In the case of init, after an installed system has run for a while, a lot of
      entropy will have gotten collected, but init will have its arc4random seeded
      with initial boot entry, so mix in some fresh entropy, so the random seed
      written on shutdown remains as entropic as possible.
      f864c59d
    • Jonas Termansen's avatar
  7. 26 Aug, 2017 1 commit
  8. 02 Jul, 2017 1 commit
  9. 12 Apr, 2017 1 commit
  10. 16 Feb, 2017 1 commit
    • Nicholas De Nova's avatar
      Correct manpage spacing per roff(7) convention. · d2176216
      Nicholas De Nova authored
      roff(7) dictates that "Each sentence should terminate at the end of an
      input line." Instead of doing this, Sortix manpages (incorrectly) used
      double-spaces to separate sentences.
      
      Additionally, fix a few small typos.
      d2176216
  11. 27 Nov, 2016 2 commits
  12. 23 Nov, 2016 1 commit
    • 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
  13. 19 Nov, 2016 1 commit
  14. 03 Oct, 2016 8 commits
    • Jonas Termansen's avatar
    • Jonas Termansen's avatar
    • Jonas Termansen's avatar
      Add partition support to sysupgrade(8). · 252c78f0
      Jonas Termansen authored
      252c78f0
    • Jonas Termansen's avatar
      b70ffb70
    • Jonas Termansen's avatar
    • Jonas Termansen's avatar
      Seed kernel entropy with randomness from the previous boot. · 84c0844f
      Jonas Termansen authored
      The bootloader will now load the /boot/random.seed file if it exists, in
      which case the kernel will use it as the initial kernel entropy. The kernel
      warns if no random seed was loaded, unless the --no-random-seed option was
      given. This option is used for live environments that inherently have no
      prior secret state. The kernel initializes its entropy pool from the random
      seed as of the first things, so randomness is available very early on.
      
      init(8) will emit a fresh /boot/random.seed file on boot to avoid the same
      entropy being used twice. init(8) also writes out /boot/random.seed on
      system shutdown where the system has the most entropy. init(8) will warn if
      writing the file fails, except if /boot is a real-only filesystem, and
      keeping such state is impossible. The system administrator is then
      responsible for ensuring the bootloader somehow passes a fresh random seed
      on the next boot.
      
      /boot/random.seed must be owned by the root user and root group and must
      have file permissions 600 to avoid unprivileged users can read it. The file
      is passed to the kernel by the bootloader as a multiboot module with the
      command line --random-seed.
      
      If no random seed is loaded, the kernel attempts a poor quality fallback
      where it seeds the kernel arc4random(3) continuously with the current time.
      The timing variance may provide some effective entropy. There is no real
      kernel entropy gathering yet. The read of the CMOS real time clock is moved
      to an early point in the kernel boot, so the current time is available as
      fallback entropy.
      
      The kernel access of the random seed module is supposed to be infallible
      and happens before the kernel log is set up, but there is not yet a failsafe
      API for mapping single pages in the early kernel.
      
      sysupgrade(8) creates /boot/random.seed if it's absent as a temporary
      compatibility measure for people upgrading from the 1.0 release. The GRUB
      port will need to be upgraded with support for /boot/random.seed in the
      10_sortix script. Installation with manual bootloader configuration will
      need to load the random seed with the --random-seed command line. With GRUB,
      this can be done with: module /boot/random.seed --random-seed
      84c0844f
    • Jonas Termansen's avatar
    • Jonas Termansen's avatar
      Refactor init(8) chain-merge target and add merge target. · 1791a195
      Jonas Termansen authored
      The chain-merge target now invokes the /sysmerge init(8) with the merge
      target, which now mounts the mountpoints. This change allows having a /boot
      partition for the purpose of sysupgrade(8).
      1791a195
  15. 25 Sep, 2016 3 commits
  16. 22 Aug, 2016 1 commit
  17. 20 Aug, 2016 2 commits
  18. 29 Jul, 2016 1 commit
  19. 15 May, 2016 1 commit
  20. 14 May, 2016 2 commits
  21. 28 Mar, 2016 1 commit
  22. 26 Mar, 2016 2 commits
  23. 06 Mar, 2016 1 commit
  24. 05 Mar, 2016 1 commit
    • Jonas Termansen's avatar
      Relicense Sortix to the ISC license. · 2b72262b
      Jonas Termansen authored
      I hereby relicense all my work on Sortix under the ISC license as below.
      
      All Sortix contributions by other people are already under this license,
      are not substantial enough to be copyrightable, or have been removed.
      
      All imported code from other projects is compatible with this license.
      
      All GPL licensed code from other projects had previously been removed.
      
      Copyright 2011-2016 Jonas 'Sortie' Termansen and contributors.
      
      Permission to use, copy, modify, and distribute this software for any
      purpose with or without fee is hereby granted, provided that the above
      copyright notice and this permission notice appear in all copies.
      
      THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
      WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
      MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
      ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
      WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
      ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
      OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
      2b72262b
  25. 29 Feb, 2016 1 commit