logo

drewdevault.com

[mirror] blog and personal website of Drew DeVault git clone https://hacktivis.me/git/mirror/drewdevault.com.git

Status-update-May-2022.md (7090B)


  1. ---
  2. title: Status update, May 2022
  3. date: 2022-05-16
  4. ---
  5. This was an exciting month: [the Hare programming language] is a secret no more!
  6. You can now [try out] the programming language I first teased [over a year ago]
  7. and [tell me what you think](mailto:sir@cmpwn.com). I hope you like it! I'm
  8. quite pleased with it so far.
  9. [the Hare programming language]: https://harelang.org
  10. [try out]: https://harelang.org/tutorials/introduction/
  11. [over a year ago]: /2021/03/19/A-new-systems-language.html
  12. One thing Hare has done is allow me to unshelve several projects which were
  13. blocked pending the availability of a suitable language to write them in. I have
  14. actually been working on several of these for a while now — and several
  15. more are to come later — but I couldn't share them thanks to Hare's policy
  16. of secrecy early in its development. Allow me to introduce you to a few
  17. projects!
  18. **[Helios]** is a micro-kernel for x86\_64, and ideally later for aarch64 and
  19. riscv64 as well (and possibly other targets as Hare grows additional ports). We
  20. have a few things working, such as paging and interrupts, and as of this morning
  21. we have entered userspace. Next up is rigging up syscalls and scheduling, then
  22. we're going to start fleshing out an L4-inspired API and writing some drivers in
  23. userspace.
  24. ![A screenshot showing Helios booting and entering userspace](https://l.sr.ht/COLx.png)
  25. [Helios]: https://sr.ht/~sircmpwn/helios
  26. **[Himitsu]** is a secret storage system. It can act as a password manager, but
  27. it also stores other arbitrary secret data, such as private keys. Each key is a
  28. set of key/value pairs, some of which can be secret. This allows you to store
  29. additional data alongside your password (such as your username or email for
  30. login), and also supports secret data other than passwords — like SSH
  31. keys. An extensible consent and agent protocols allow you to expand it to
  32. support a wide variety of use-cases for secure use of secrets.
  33. <video src="https://mirror.drewdevault.com/hissh-agent.webm" muted controls></video>
  34. [Himitsu]: https://sr.ht/~sircmpwn/himitsu
  35. [Codeberg]: https://codeberg.org
  36. **[btqd]**, or "bittorrent queue daemon", is (going to be) a bittorrent daemon,
  37. but it is still very early in development. The design is essentially that of a
  38. process supervisor which manages a queue of torrents and fires up subprocesses
  39. to seed or leech for a set of active torrents. Each subprocess, such as btlc
  40. (bittorrent leech client), or btsc (bittorrent seed client), can also be used
  41. separately from the queue daemon. Further development is blocked on net::http,
  42. which is blocked on TLS support, for tracker announce requests. I may
  43. temporarily unblock this by shelling out to curl instead.
  44. [btqd]: https://sr.ht/~sircmpwn/btqd
  45. **[scheduled]** is also early in development. It is a replacement for crond (and
  46. also [at(1)]) which is redesigned from the ground up. I have never been thrilled
  47. with cron's design &mdash; it's very un-Unix like. scheduled will have better
  48. error handling and logging, a much more flexible and understandable approach to
  49. configuration, and a better approach to security, plus the ability to do ad-hoc
  50. scheduling from the command line. This was designed prior to date/time support
  51. landing in Hare, and was blocked for a while, but is now unblocked. However, it
  52. is not my highest priority.
  53. [scheduled]: https://sr.ht/~sircmpwn/scheduled
  54. [at(1)]: https://linux.die.net/man/1/at
  55. ---
  56. Each of these projects will spawn more blog posts (or talks) going into greater
  57. depth on their design goals and rationale later on. For now, with the
  58. introductions out of the way, allow me to fill you in on the things which got
  59. done in this past month in particular.
  60. I'll keep the SourceHut news short, and expand upon it in the "what's cooking"
  61. post later today. For my own part, I spent some time working on [hut] to add
  62. support for comprehensive account data import/export. This will allow you to
  63. easily take all of your data out of sourcehut and import it into another
  64. instance, or any compatible software &mdash; your git repos are just git repos
  65. and your mailing lists are just mbox files, so you could push them to GitHub or
  66. import them into GNU Mailman, for example. This work is also a step towards
  67. self-service account deletion and renaming, both prioritized for the beta.
  68. [hut]: https://sr.ht/~emersion/hut
  69. Regarding Hare itself, there are many important recent developments. Over 300
  70. commits landed this month, so I'll have to leave some details out. An OpenBSD
  71. port is underway by Brian Callahan, and the initial patches have landed for the
  72. Hare compiler. The crypto module grew [blowfish] and [bcrypt] support, both
  73. useful mainly for legacy compatibility, as well as the more immediately useful
  74. [x25519] and [pem] implementations. There is also a new [encoding::json]
  75. module,[^extlib] and a number of fixes and improvements have been steadily
  76. flowing in for [regex], [bufio], [net], [net::uri], and [datetime], along with
  77. dozens of others.
  78. [blowfish]: https://docs.harelang.org/crypto/blowfish
  79. [bcrypt]: https://docs.harelang.org/crypto/bcrypt
  80. [x25519]: https://docs.harelang.org/crypto/x25519
  81. [regex]: https://docs.harelang.org/regex
  82. [bufio]: https://docs.harelang.org/bufio
  83. [datetime]: https://docs.harelang.org/datetime
  84. [pem]: https://docs.harelang.org/encoding/pem
  85. [net]: https://docs.harelang.org/net
  86. [net::uri]: https://docs.harelang.org/net/uri
  87. [encoding::json]: https://docs.harelang.org/encoding/json
  88. [^extlib]: Which is likely to be moved to the extended library in the future.
  89. For Himitsu, I developed [hare-ssh] this month to facilitate the addition of
  90. [himitsu-ssh], which provides SSH tooling that integrates with Himitsu (check
  91. out the video above for a demo). The "hissh-import" command decodes OpenSSH
  92. private keys and loads them into the Himitsu keystore, and the "hissh-agent"
  93. command runs an SSH agent that performs authentication with the private keys
  94. stored in Himitsu. Future additions will include "hissh-export", for getting
  95. your private keys back out in a useful format, and "hissh-keygen", for skipping
  96. the import/export step entirely. Presently only ed25519 keys are supported; more
  97. will be added as the necessary primitives are added to Hare upstream.
  98. [hare-ssh]: https://sr.ht/~sircmpwn/hare-ssh
  99. [himitsu-ssh]: https://git.sr.ht/~sircmpwn/himitsu-ssh
  100. I did some work on Helios this weekend, following a brief hiatus. I wrote a more
  101. generalized page table implementation which can manage multiple page tables
  102. (necessary to have separate address spaces for each process), and started
  103. rigging up the kernel to userspace transition, which I briefly covered earlier
  104. in the post. As of this morning, I have some code running in userspace &mdash;
  105. one variant attempts to `cli`, causing a general protection fault (as expected),
  106. and another just runs a busy loop, which works without any faults. Next steps
  107. are syscalls and scheduling.
  108. That's all the news for today. Hare! Woo! Thanks for reading, and be sure to
  109. check out &mdash; and maybe contribute to? &mdash; some of these projects. Take
  110. care!