---
# System prepended metadata

title: Release Notes - v0.17

---

:::info
To generate the feature list:

```bash
gh pr list -s closed -L 100 --search "is:pr is:closed closed:>2024-06-07" --json author,title,number --template '{{range .}}{{ printf "* %s (#%v) by @%s\n" .title .number .author.login }}{{end}}'
```

To generate the list of reviewers:

```bash
git --no-pager log --format="* %(trailers:key=Reviewed-by,valueonly,separator=%x2C )" --abbrev-commit HEAD...RELEASE-0.17 | sed 's/, /\n* /g' | sort -u
```
:::

:::danger
before submitting, please search the document for "TODO", "commit"
:::

[toc]

## GitHub Release Note

We are proud to announce the latest version update of Unikraft, v0.17!
This release comes with plenty of new features and updates.

⚠️  Be aware of the following potentially breaking changes:

* The `linuxu` platform has been removed.
  No build should be performed against the `linuxu` platform.

* Random number generation is reliant on CPU support.
  This means that, when using QEMU, one of two options must be enabled:

  1. You are using QEMU >= 8.0.
  1. You are using hardware acceleration, with KVM.

  There is an (**insecure**) configuration option to disable support for CPU-based randomization.
  This is however only recommended for test & development builds.

Here is the full updates list:

### 🚀 New Features

* `include/uk`: Import tree implementations from FreeBSD + improvements ([#1356](https://github.com/unikraft/unikraft/pull/1356)) by @andreittr
* `plat/linuxu`: Retire mostly unused and unmaintained linuxu platform ([#1422](https://github.com/unikraft/unikraft/pull/1422)) by @skuenzer
* `lib/ukfile`: API improvements ([#1397](https://github.com/unikraft/unikraft/pull/1397)) by @andreittr
* `lib/posix-poll`: Add option to yield on wait ([#1319](https://github.com/unikraft/unikraft/pull/1319)) by @andreittr
* `lib/posix-poll`: Autoremove closed files from `epoll` ([#1419](https://github.com/unikraft/unikraft/pull/1419)) by @andreittr
* `plat`: Rework paged memory init ([#1373](https://github.com/unikraft/unikraft/pull/1373)) by @michpappas
* `driver/virtio/blk`: Ensure request header stays in-page boundaries AND some minor `sglist` cleanup ([#1290](https://github.com/unikraft/unikraft/pull/1290)) by @mogasergiu
* `lib/posix-*`: Add support for packet pipes & datagram unix sockets ([#1272](https://github.com/unikraft/unikraft/pull/1272)) by @andreittr
* `lib/{vfscore, posix-tty}`: Introduce `posix-tty` & move stdio/console files out of vfscore ([#1226](https://github.com/unikraft/unikraft/pull/1226)) by @andreittr
* `lib/ukrandom`: Rename and refactor `lib/ukswrand` ([#1008](https://github.com/unikraft/unikraft/pull/1008)) by @Alex-deVis
* `lib`: Introduce generic (page guarded) stack allocator library ([#1322](https://github.com/unikraft/unikraft/pull/1322)) by @mogasergiu
* `{lib,arch,plat}`: Redo syscall ctx's and `swapgs` logic ([#1346](https://github.com/unikraft/unikraft/pull/1346)) by @mogasergiu
* `[app-elfloader]`: Adjust to the rename `ukarch_sysregs` -> `ukarch_sysctx` ([#77](https://github.com/unikraft/app-elfloader/pull/77)) by @mogasergiu

### 🐛 Bug Fixes & Improvements

* `plat/common`: Fix wrong `vbase` of legacy video memory area ([#1452](https://github.com/unikraft/unikraft/pull/1452)) by @mogasergiu
* `lib/ukrandom`: Alternative options for seeding the CSPRNG ([#1451](https://github.com/unikraft/unikraft/pull/1451)) by @michpappas
* `plat`: Set `HAVE_RANDOM` at the platform ([#1450](https://github.com/unikraft/unikraft/pull/1450)) by @michpappas
* `plat/common`: A bunch of fixes post-merge of [#1212](https://github.com/unikraft/unikraft/pull/1212) ([#1449](https://github.com/unikraft/unikraft/pull/1449)) by @mogasergiu
* `plat/xen`: Remove `UKPLAT_MEMRF_MAP` from `arm/setup64` ([#1445](https://github.com/unikraft/unikraft/pull/1445)) by @michpappas
* `plat/common/x86`: Sanitize the ECTX slot on syscall entry ([#1444](https://github.com/unikraft/unikraft/pull/1444)) by @mogasergiu
* `plat/common/arm`: Check for QARMA3 support in `pauth_init()` ([#1441](https://github.com/unikraft/unikraft/pull/1441)) by @michpappas
* `lib/ukalloc`: Fix build with clang when `MEMTAG` is enabled ([#1440](https://github.com/unikraft/unikraft/pull/1440)) by @michpappas
* `arch/arm64`: Add checks for min clang version ([#1439](https://github.com/unikraft/unikraft/pull/1439)) by @michpappas
* `lib/posix-poll`: Fix finalizer duplication in `epoll` ([#1438](https://github.com/unikraft/unikraft/pull/1438)) by @andreittr
* `plat/xen/arm`: Set `pg_count` parameter for mrd regions ([#1436](https://github.com/unikraft/unikraft/pull/1436)) by @oleksiimoisieiev
* `.github/workflows`: Allow capital letters in files & new error message ([#1435](https://github.com/unikraft/unikraft/pull/1435)) by @craciunoiuc
* `plat/xen`: Remove redundant memory region ([#1434](https://github.com/unikraft/unikraft/pull/1434)) by @andreistan26
* `README`: Fix broken codacy link ([#1433](https://github.com/unikraft/unikraft/pull/1433)) by @thass0
* `lib/vfscore`: Add support for renameat syscall ([#1430](https://github.com/unikraft/unikraft/pull/1430)) by @RaduNichita
* `plat/common/arm`: Add ISB after enabling PAuth() ([#1428](https://github.com/unikraft/unikraft/pull/1428)) by @michpappas
* `docs`: Update `ADOPTERS.md` with CertKOR ([#1425](https://github.com/unikraft/unikraft/pull/1425)) by @hapticslabs
* `.github/workflows`: Pretty print failed runs ([#1423](https://github.com/unikraft/unikraft/pull/1423)) by @craciunoiuc
* `lib/posix-unixsocket`: Add support for destination in `sendmsg` ([#1421](https://github.com/unikraft/unikraft/pull/1421)) by @andreittr
* `lib/vfscore`: Do not interpret device pointer as string ([#1418](https://github.com/unikraft/unikraft/pull/1418)) by @mschlumpp
* `lib/posix-fdio`: Allow owner/group == -1 for `fchown` ([#1416](https://github.com/unikraft/unikraft/pull/1416)) by @andreittr
* `lib/ukvmem`: Ensure `bool` exists through `stdbool.h` in VMA stacks ([#1415](https://github.com/unikraft/unikraft/pull/1415)) by @mogasergiu
* `uk/plat`: Mark MRD validation flags variable in macro as maybe unused ([#1414](https://github.com/unikraft/unikraft/pull/1414)) by @mogasergiu
* `lib/ukboot`: Fix configuration of no "no scheduler" ([#1413](https://github.com/unikraft/unikraft/pull/1413)) by @skuenzer
* `.github/workflows`: Tidy up unused checkpatch variables ([#1400](https://github.com/unikraft/unikraft/pull/1400)) by @craciunoiuc
* `lib/ukboot`: Fix unused variable warning in `boot.c` ([#1399](https://github.com/unikraft/unikraft/pull/1399)) by @keenox
* `lib/ukfile`: Add utility inlines for iovec I/O ([#1396](https://github.com/unikraft/unikraft/pull/1396)) by @andreittr
* `plat/kvm/x86`: Add dependency to ukbitops ([#1395](https://github.com/unikraft/unikraft/pull/1395)) by @andreittr
* `lib/posix-fdio`: Add bincompat support for `RWF_*` ([#1394](https://github.com/unikraft/unikraft/pull/1394)) by @andreittr
* `lib/posix-*`: Fix missing/unneeded dependencies ([#1393](https://github.com/unikraft/unikraft/pull/1393)) by @andreittr
* `lib/posix-fdio`: Move non-trivial libc syscall wrappers over from vfscore ([#1392](https://github.com/unikraft/unikraft/pull/1392)) by @andreittr
* `support`: Change `PYTHONCMD` to python3 ([#1391](https://github.com/unikraft/unikraft/pull/1391)) by @tbunch1
* `.clang-format`: Update to match coding conventions ([#1390](https://github.com/unikraft/unikraft/pull/1390)) by @tbunch1
* `lib/ukvmem/arch/arm`: Fix `error_code` build error with correct `esr` ([#1388](https://github.com/unikraft/unikraft/pull/1388)) by @mogasergiu
* `lib/ukfile`: Remove padding from struct `uk_statx` ([#1387](https://github.com/unikraft/unikraft/pull/1387)) by @andreittr
* `lib/syscall_shim`: Update syscall numbers to 6.8 ([#1385](https://github.com/unikraft/unikraft/pull/1385)) by @andreittr
* `.github/workflows`: Catalog tests fixes and adjustments ([#1382](https://github.com/unikraft/unikraft/pull/1382)) by @craciunoiuc
* `lib/ukboot`: Silence compiler warning on envp ([#1378](https://github.com/unikraft/unikraft/pull/1378)) by @michpappas
* `lib/posix-process`: Fix off-by-one error in tid check ([#1377](https://github.com/unikraft/unikraft/pull/1377)) by @michpappas
* `lib/vfscore`: No-op `mkmp` on `/` ([#1376](https://github.com/unikraft/unikraft/pull/1376)) by @mogasergiu
* `lib/posix-timerfd`: Fix update thread double free and add update thread dtor ([#1375](https://github.com/unikraft/unikraft/pull/1375)) by @mogasergiu
* `doc`: Correct links in `README.md` ([#1374](https://github.com/unikraft/unikraft/pull/1374)) by @razvand
* `arch/`: Replace libc types with Unikraft defined ([#1369](https://github.com/unikraft/unikraft/pull/1369)) by @rares-miculescu
* `include/uk`: Replace libc types with Unikraft defined ([#1368](https://github.com/unikraft/unikraft/pull/1368)) by @rares-miculescu
* `doc`: Refactor README.md with new layout and latest info ([#1366](https://github.com/unikraft/unikraft/pull/1366)) by @nderjung
* `.github/workflows`: Add job to merge staging to stable ([#1363](https://github.com/unikraft/unikraft/pull/1363)) by @craciunoiuc
* `lib/ukcpio`: Consistently overwrite existing destination ([#1362](https://github.com/unikraft/unikraft/pull/1362)) by @andreittr
* `arch/x86`: Use the ISR-safe variant for ectx string operations ([#1357](https://github.com/unikraft/unikraft/pull/1357)) by @kha-dinh
* `lib/posix-environ`: Deduplicate env variables during boot ([#1352](https://github.com/unikraft/unikraft/pull/1352)) by @skuenzer
* `lib/ukfile`: Add opt-in support for file finalizers ([#1341](https://github.com/unikraft/unikraft/pull/1341)) by @andreittr
* `lib/posix-socket`: Expose internal socket syscalls ([#1337](https://github.com/unikraft/unikraft/pull/1337)) by @andreittr
* `lib/posix-time*`: Replace time syscalls with internal API ([#1336](https://github.com/unikraft/unikraft/pull/1336)) by @andreittr
* `plat/kvm/x86`: Add early COM1 init/print for CPU init errors ([#1335](https://github.com/unikraft/unikraft/pull/1335)) by @mogasergiu
* `lib/uknofault`: Add on-demand paging disabled read/write operations ([#1333](https://github.com/unikraft/unikraft/pull/1333)) by @mogasergiu
* `{arch,plat}/x86`: Refactor `FS_BASE/GS_BASE` operations ([#1316](https://github.com/unikraft/unikraft/pull/1316)) by @mogasergiu
* `lib/posix-unixsocket`: Add basic `*sockopt` support ([#1314](https://github.com/unikraft/unikraft/pull/1314)) by @andreittr
* `uk/plat/memory`: Introduce `pg_off` and `pg_count` memregion fields ([#1212](https://github.com/unikraft/unikraft/pull/1212)) by @mogasergiu
* `lib/ukrust`: Fix helloworld-rust application compilation error ([#1163](https://github.com/unikraft/unikraft/pull/1163)) by @cocodery
* `plat`: Migrate RTC PL031 to `drivers/ukrtc/` ([#972](https://github.com/unikraft/unikraft/pull/972)) by @rares-miculescu
* `doc`: Replaced libc types with unikraft defined ([#954](https://github.com/unikraft/unikraft/pull/954)) by @rares-miculescu
* `arch/x86`: Fix interrupts on qemu-microvm/qboot ([#947](https://github.com/unikraft/unikraft/pull/947)) by @felixmoebius
* `[app-click]`: Rename `LIBUKSWRAND` to `LIBUKRANDOM` ([#6](https://github.com/unikraft/app-click/pull/6)) by @Alex-deVis
* `[app-elfloader]`: Rename `LIBUKSWRAND` to LIBUKRANDOM` ([#80](https://github.com/unikraft/app-elfloader/pull/80)) by @Alex-deVis
* `[app-elfloader]`: Use default allocators of the current scheduler for stacks/TLS ([#73](https://github.com/unikraft/app-elfloader/pull/73)) by @mogasergiu
* `[app-elfloader]`: `Config.uk`: Imply yield-on-wait behavior for `*poll` ([#72](https://github.com/unikraft/app-elfloader/pull/72)) by @andreittr
* `[lib-embedded-gcov]`: Add memory output support ([#3](https://github.com/unikraft/lib-embedded-gcov/pull/3)) by @Starnox
* `[lib-embedded-gcov]`: Add binary file output support ([#2](https://github.com/unikraft/lib-embedded-gcov/pull/2)) by @Starnox
* `[lib-libc-test]`: patches: Adapt malloc patch to match new test format ([#4](https://github.com/unikraft/lib-libc-test/pull/4)) by @craciunoiuc
* `[lib-libsodium]`: Rename `LIBUKSWRAND` to `LIBUKRANDOM` ([#10](https://github.com/unikraft/lib-libsodium/pull/10)) by @Alex-deVis
* `[lib-lwip]`: Rename `LIBUKSWRAND` to `LIBUKRANDOM` ([#57](https://github.com/unikraft/lib-lwip/pull/57)) by @Alex-deVis
* `[lib-lwip]`: `patches`: Bring back address structure length checks ([#56](https://github.com/unikraft/lib-lwip/pull/56)) by @mogasergiu
* `[lib-lwip]`: Indicate `EPOLLRDHUP` when the peer closed the connection ([#55](https://github.com/unikraft/lib-lwip/pull/55)) by @mschlumpp
* `[lib-lwip]`: `lwip`: Provide config option for `SO_LINGER` and enable by default ([#52](https://github.com/lib-lwip/unikraft/pull/52)) by @michpappas
* `[lib-musl]`: Rename `LIBUKSWRAND` to `LIBUKRANDOM` ([#78](https://github.com/unikraft/lib-musl/pull/78)) by @Alex-deVis
* `[lib-musl]`: Add `sys/membarrier.h` to the headers list ([#76](https://github.com/unikraft/lib-musl/pull/76)) by @StefanJum
* `[lib-nginx]`: Rename LIBUKSWRAND to `LIBUKRANDOM` ([#17](https://github.com/unikraft/lib-nginx/pull/17)) by @Alex-deVis
* `[lib-openssl]`: Rename `LIBUKSWRAND` to `LIBUKRANDOM` ([#10](https://github.com/unikraft/lib-openssl/pull/10)) by @Alex-deVis
* `[lib-redis]`: Rename `LIBUKSWRAND` to `LIBUKRANDOM` ([#14](https://github.com/unikraft/lib-redis/pull/14)) by @Alex-deVis


A big thank you also to all those who helped in the [review process](unikraft.org/docs/contributing/review-process/): [Alexander Jung](https://github.com/nderjung), [Alexandru Apostolescu](https://github.com/Alex-deVis), [Andrei Stan](https://github.com/andreistan26), [Andrei Tatar](https://github.com/andreittr), [Cezar Craciunoiu](https://github.com/craciunoiuc), [Delia Pavel](https://github.com/DeliaPavel), [Eduard Vintilă](https://github.com/eduardvintila), [Felipe Huici](https://github.com/felipehuici), [Marco Schlumpp](https://github.com/mschlumpp), [Maria Pana](https://github.com/mariapana), [Maria Sfiraiala](https://github.com/mariasfiraiala), [Michalis Pappas](https://github.com/michpappas), [Mihnea Firoiu](https://github.com/Mihnea0Firoiu), [Mihnea Popeanga](https://github.com/Mihnea27), [Radu Nichita](https://github.com/RaduNichita), [Rares Miculescu](https://github.com/rares-miculescu), [Razvan Deaconescu](https://github.com/razvand), [Razvan Virtan](https://github.com/razvanvirtan), [Robert Zamfir](https://github.com/robertZamfir601), [Serban Sorohan](https://github.com/SerbanSo), [Sergiu Moga](https://github.com/mogasergiu), [Simon Kuenzer](https://github.com/skuenzer), [Stefan Jumarea](https://github.com/StefanJum).

---

For more information, check out [the accompanying blog post](https://unikraft.org/blog/2024-06-07-unikraft-releases-v0.17) or [view the full changelog](https://github.com/unikraft/unikraft/compare/RELEASE-0.16.3...RELEASE-0.17).

---

## Twitter

Unikraft v0.17 is here! 🚀

Check out the blog post for details on the latest changes: https://unikraft.org/blog/2024-06-07-unikraft-releases-v0.17

---

## LinkedIn

Unikraft v0.17 is here! 🚀

It add plenty of fixes to improve application support, including features related to vfscore and memory management.

Check out the blog post for details on the latest changes (https://unikraft.org/blog/2024-06-07-unikraft-releases-v0.17) and join us on GitHub (https://github.com/unikraft/) and on Discord (https://bit.ly/UnikraftDiscord).

---

## Blog Post

We are proud to announce the update version of Unikraft, v0.17.0.

This release comes packed with features related to security, virtual filesystem and general application support.
It contains plenty of fixes that improve the stability and application support of Unikraft.

In this blog post, we present the new features available in Unikraft.
For a full breakdown, please check out the [changelog](https://github.com/unikraft/unikraft/compare/RELEASE-0.15.0...RELEASE-0.16.0).

### Remove `linuxu` platform ([#1422](https://github.com/unikraft/unikraft/pull/1422))

_This feature was championed by [Simon Kuenzer](https://github.com/skuenzer) with support from [Marco Schlumpp](https://github.com/mschlumpp)._

Given the limited scope and reduced use of the `linuxu` platform, it has been removed.
This simplifies maintenance effort.

Applications should no longer be built for the `linuxu` platform.

### Rework Paged Memory Init ([#1373](https://github.com/unikraft/unikraft/pull/1373))

_This feature was championed by [Michalis Pappas](https://github.com/michpappas) with great support from [Sergiu Moga](https://github.com/mogasergiu) and assistance from [Șerban Sorohan](https://github.com/SerbanSo)._

The initialization of paged memory is now reworked to provide a more flexible implementation that is capable of handling regions beyond the limits defined in the boot pagetables. The motivation for this change is to allow mapping device regions that are unknown at compile-time, such as device regions of Arm CCA Realms accessed via their Unprotected IPA Alias, the address of which cannot be derived at compile-time.

The new implementation replaces the previous method of updating the boot pagetables with the initialization of a new pagetable from regions defined in bootinfo. This simplifies the implementation and avoids expensive TLB flushes associated with updating the existing pagetable. To support this rework additional changes have been made to bootinfo and the way device MMIO regions are mapped.

#### Changes in bootinfo

With the initialization of a new pagetable bootinfo is now simplified to only contain descriptors that correspond to valid memory regions. This deprecates the `UKPLAT_MEMRF_MAP` / `UKPLAT_MEMRF_UNMAP` flags in bootinfo regions as well as the hard-coded `unmap_mrd` region in the boot pagetables.

#### Changes in Device MMIO Regions

The initialization of a new pagetable additionally requires that early devices add descriptors for their MMIO regions to bootinfo, so that they remain mapped when transitioning to the new pagetable. To address this requirement, a new early init boot-stage has been added to `kvm/arm64`, that is invoked at the end of early boot before passing control to the platform. `x86_64` is not affected by this change.

Finally, devices that register at later stages of init are also updated to map their MMIO regions at runtime.

#### Misc Updates

This changeset comes with additional changes and cleanup, most importantly on the drivers of the `pl011` and `ns16550` devices.

### Revise the Generation of Random Numbers ([#1008](https://github.com/unikraft/unikraft/pull/1008))

_This feature was championed by [Alexandru Apostolescu](https://github.com/Alex-deVis) and [Michalis Pappas](https://github.com/michpappas) with support from [Sergiu Moga](https://github.com/mogasergiu) and [Delia Pavel](https://github.com/DeliaPavel)._

The `uk_swrand` library has been redesigned to exclusively provide cryptographically secure random numbers and has been renamed to `uk_random`. The random numbers are generated using the `ChaCha20` algorithm, seeded by a hardware TRNG. Both `/dev/random` and `/dev/urandom` provide access to the output of the software CSPRNG, while direct access to hardware generated randomness is exposed through the newly added `/dev/hwrng`, which provides additional compatibility with Linux.

For non security-critical use cases, software-generated non cryptographically-secure random numbers are available via the standard library's `rand()` function, available in [nolibc](https://github.com/unikraft/unikraft/blob/staging/lib/nolibc/random.c) and [musl](https://git.musl-libc.org/cgit/musl/tree/src/prng/rand.c).

### vfscore Redesign

_This set of features were championed by [Andrei Tatar](https://github.com/andreittr) with support from [Andrei Stan](https://github.com/andreistan26), [Andrei Tatar](https://github.com/andreittr), [Delia Pavel](https://github.com/DeliaPavel), [Eduard Vintilă](https://github.com/eduardvintila), [Marco Schlumpp](https://github.com/mschlumpp), [Mihnea Firoiu](https://github.com/Mihnea0Firoiu), [Mihnea Popeanga](https://github.com/Mihnea27), [Radu Nichita](https://github.com/RaduNichita), [Razvan Deaconescu](https://github.com/razvand), [Razvan Virtan](https://github.com/razvanvirtan), [Serban Sorohan](https://github.com/SerbanSo), [Stefan Jumarea](https://github.com/StefanJum)._

As part of [the ongoing effort to deprecate `vfscore`](https://unikraft.org/blog/2024-01-02-unikraft-releases-telesto#virtual-filesystem-interface-redesign) in favor of an improved and more modular file/filesystem layer, [the new-style `ukfile`](https://github.com/unikraft/unikraft/tree/staging/lib/ukfile)s introduced in v0.16.0 (Telesto) have seen new additions and marked improvements. In addition to many under-the-hood changes, users and developers alike can expect several new features.

#### posix-tty: Serial and Pseudo-files for Standard I/O ([#1226](https://github.com/unikraft/unikraft/pull/1226))

The handling of standard I/O files (`stdin`, `stdout`, `stderr`) has been moved out of `vfscore` into its own core library: [`posix-tty`](https://github.com/unikraft/unikraft/tree/staging/lib/posix-tty), responsible for `ukfile` implementations of serial- and pseudo-files, as well as the initialization of the first 3 file descriptors on boot.

With this change, file descriptors `0`, `1`, and `2` are no longer special and can be closed like any other files.

#### Packet-mode Pipes ([#1272](https://github.com/unikraft/unikraft/pull/1272))

Support for packet-mode pipes (`O_DIRECT`) has been introduced. This Linux extension has pipes behave analogous to datagram sockets, handling data in indivisible "packets" and  matching each read with a singular write.

#### Improvements to UNIX Sockets ([#1272](https://github.com/unikraft/unikraft/pull/1272))

UNIX Sockets, introduced in the previous release have seen improvements:

- support for datagram (`SOCK_DGRAM`) and sequential-packet (`SOCK_SEQPACKET`) sockets
- support for specifying a destination socket in calls to `sendto` & equivalent
- support for basic socket options with `getsockopt`/`setsockopt`

#### Opt-in Scheduler Yield in File Polling ([#1319](https://github.com/unikraft/unikraft/pull/1319))

File polling functions (`select`/`poll`/`epoll`) can now be opted into forcefully yielding execution back to the scheduler when called. This may help mitigate hangs on workloads that (perhaps inadvertently) rely on a pre-emptive/starvation-free scheduler to work correctly. This behavior is enabled by the `CONFIG_LIBPOSIX_POLL_YIELD` `Kconfig` option.

#### Autoremove Closed Files from `epoll` ([#1419](https://github.com/unikraft/unikraft/pull/1419))

Files that are closed while being monitored by `epoll` will now automatically remove themselves from being monitored. This prevents resource leaks on workloads such as Nginx that do not remove files from `epoll` before closing.

#### Misc `ukfile` API Changes & Improvements ([#1397](https://github.com/unikraft/unikraft/pull/1397))

The (still in development) `ukfile` API continues to stabilize and improve in response to the needs of consumer libraries:

- File finalizers: custom cleanup code to be run when the last reference to a file is dropped. The aforementioned `epoll` feature of autodeleting closed files is implemented using file finalizers;
- Expose operations directly on file state; and,
- Common code for `iovec`-based I/O.

### Binary Tree Implementations from FreeBSD ([#1356](https://github.com/unikraft/unikraft/pull/1356))

_This feature was championed by [Andrei Tatar](https://github.com/andreittr) with support from [Marco Schlumpp](https://github.com/mschlumpp), [Delia Pavel](https://github.com/DeliaPavel) and [Mihnea Firoiu](https://github.com/Mihnea0Firoiu)._

Implementations of splay and rank-balanced trees have been imported from FreeBSD 13.3, enabling their use in Unikraft libraries for implementing efficient mappings.

### Introduce Generic (Page Guarded) Stack Allocator Library ([#1322](https://github.com/unikraft/unikraft/pull/1322))

_This feature was championed by [Sergiu Moga](https://github.com/mogasergiu) with support from [Michalis Pappas](https://github.com/michpappas) and [Simon Kuenzer](https://github.com/skuenzer)._

Implement a generic stack allocation wrapper over a given Unikraft memory allocator. The library receives as arguments an allocator and, if `libukvmem` is enabled, a virtual address space and an initial size. The library works in three ways:

1. If `libukvmem` is disabled, the library will make use of the allocator received as argument to allocate the initial allocator structure and Unikraft compliant stacks (16-byte alignment).
2. If `libukvmem` is enabled, the library will make use of the allocator received as argument to allocate the initial allocator structure and Unikraft compliant stacks. The difference from 1. is that the virtual address space and the initial size arguments are now available. The two arguments will hint how much of the stack to premap (page-in early) whenever they are allocated first, i.e. what is the initial stack size before on-demand paging kicks in.
3. If `libukvmem` is enabled AND the configuration option of the library integrating page guards is enabled, the allocator given as argument will only be used once when allocating the initial allocator structure, while the virtual address space and initial size arguments will be used to create stack VMA's, specific to `libukvmem`.

Additionally, now all `libukvmem` stacks have their guards end-to-end with the help of two new configurations: `CONFIG_LIBUKVMEM_STACK_GUARD_PAGES_TOP` (Number of guard pages for the top of the stack) and `CONFIG_LIBUKVMEM_STACK_GUARD_PAGES_BOTTOM` (Number of guard pages for the bottom of the stack (low address)).

### Redo Syscall ctx's and `swapgs` Logic ([#1346](https://github.com/unikraft/unikraft/pull/1346), [#77](https://github.com/unikraft/app-elfloader/pull/77))

_This feature was championed by [Sergiu Moga](https://github.com/mogasergiu) with great support from [Simon Kuenzer](https://github.com/skuenzer)._

Following the introduction of the concept of auxiliary stack pointers, `swapgs`, `struct uk_syscall_ctx` and `struct ukarch_sysregs`, a number of things have emerged:

- the aforementioned structs are very generic so they should be moved under `libcontext` (`arch/`)
- `swapgs` introduces a significant inconsistency between `ARM64` and `x86_64` as we never know during an exception the state of `MSR_GS_BASE` / `MSR_KERNEL_GS_BASE`
- auxiliary stack pointers  have increased flexibility as every thread and LCPU can have one and have private data stored in there than may be accessed anytime, dependency free

Thus, this commit does the following:

1. Move/rename aforementioned structured to `libcontext` and document them

  - `lib/syscall_shim/arch/x86_64/sysregs.c` -> `arch/x86/sysctx.c`
  - `lib/syscall_shim/arch/x86_64include/arch/sysregs.h` -> `arch/x86/x86_64include/uk/asm/sysctx.h`
  - `s/struct ukarch_sysregs/struct ukarch_sysctx/` (and all related defs)
  - `struct uk_syscall_ctx from lib/syscall_shim/include/uk/syscall.h` to `include/uk/arch/ctx.h` as `struct ukarch_execenv`
  - `s/struct uk_syscall_ctx/struct ukarch_execenv/` (and all related defs)
  - actually comment these functions
  - re-adjust all places that make use of such definitions

2. Get rid of the `swapgs`, architecture specific holdback by exploiting the flexibility of auxiliary stacks through the introduction of a new always existing control block at their top end:

  - introduce `struct ukarch_auxspcb` under `libcontext`
  - add Unikraft system context as field to it so that we always have and know Unikraft TLS (and LCPU in case ox x86_64) in a dependency free and assumption free manner
  - add a current frame pointer field: since the `auxspscb` will be part of the auxiliary stack, we need to know the safe place where we can start using the auxiliary stack area as a stack (this is also helpful in cases where we need to nest on the `auxstack`)
  - for the aforementioned fields/structs, init/getter/setter functions have been added and documented
  - now the `swapgs` pair will only be done very early during system call entry (and only there, not on clone child exit anymore either) just enough so that we, first things first, switch to `auxstack` and push `auxsp` so that on entry to C handler we will know that we must do a call to `ukarch_sysctx_load` on the Unikraft `sysctx` we can get from the pushed `auxsp` (another benefit of this is we get rid of MSR read/writes)

### Community Activities

#### Monthly Coding Sessions

We continue organizing monthly coding sessions (formerly hackathons), generally taking place in the last Saturday of each month. Hackathons take place both online and in person, generally at the National University of Science and Technology POLITEHNICA of Bucharest.

We organized a monthly coding session on Saturday, March 30, 2024. And then we organized one on Sunday, April 28, 2024. It was targeted on the 0.17 release.

The next monthly coding session is scheduled to take place on Saturday, June 22, 2024.

#### Unikraft Summer Workshop 2024

[Unikraft Summer Workshop 2024 (*USW'24*)](https://unikraft.org/hackathons/usw24) is a **free and virtual** workshop held by members of the Unikraft community. It focuses on cloud-native applications and on the unikernel technology that powers efficient and high performance cloud deployments.

The three-week event holds a number of starter tutorials and workshops on how to configure, build, run, deploy and debug cloud applications using Unikraft.

There will be 6 sessions taking place in the first two weeks (between July 1 and July 12, 2024). Each session takes place for 3 hours, in the 4pm-7pm CEST, in English. Sessions will consist of talks and demos delivered by members of the Unikraft community, followed by practical tutorials that you will work on with support and supervision. Sessions take place on [Unikraft's Discord server](https://bit.ly/UnikraftDiscord).

Topics include building unikernels, benchmarking, debugging, porting applications, virtualization and platform specifics. The first 3 sessions (first week) will focus on using KraftKit, Unikraft's companion tool, to manage cloud applications. The next 3 sessions (second week) will focus on the internals of Unikraft: the build system, native configuration options, application porting.

The two weeks with sessions will be followed by a week of working on the final project. You will work on the project in teams of 2-3 people. We will have support sessions online to help with the project.

On Saturday, 20 July 2024, 9am-5pm CEST, we will have the final hackathon, that consists of adding final touches to the project. The hackathon will take place in hybrid format, in person, at the [The National University of Science and Technology POLITEHNICA of Bucharest](https://upb.ro/en/), and, online, [Unikraft's Discord server](https://bit.ly/UnikraftDiscord). Participants will receive a participation diploma. The first three teams will get special prizes. All hackathon in-person participants will get a Unikraft T-shirt.

#### DORS/CLUC

Unikraft was part of [DORS/CLUC](https://www.dorscluc.org/), an open source conference, taking place in Zagreb, Croatia, on May 14-17, 2024, where:

- [Ștefan Jumărea](https://github.com/StefanJum) presented his work, [Enhancing Memory Security for Unikernels with MTE](https://drive.google.com/file/d/1OjM74FSmXihnFv8Q_C0AUqLEaL5UKsok/view?usp=sharing); and,
- [Răzvan Deaconescu](https://github.com/razvand) took part in the [Open 4 Business meetup](https://www.dorscluc.org/open-4-business/) and presented [Unikraft: A POSIX-compliant Unikernel for the Cloud](https://docs.google.com/presentation/d/1DV2Z1EBhHlx-SgMp2DQsPPCKL7U5PCjCvEHY7HXBf4M/edit?usp=sharing).

It was a great occasion to get in touch with other members of the open source community and advertise the Unikraft project, both to technical enthusiasts and business professionals.

#### Zagreb Unikraft Hackathon

The [Zagreb Unikraft Hackathon](https://unikraft.org/hackathons/2024-05-zagreb) was organized in conjunction with [DORS/CLUC](https://www.dorscluc.org/) on May 18-19, 2024. This was the first event focused on cloud applications, KraftKit and KraftCloud.

Participants were able to deploy existing application and also try their own, using unikernel technology and KraftCloud.

#### Xen Summit 2024

Unikraft took part in [Xen Summit 2024](https://events.linuxfoundation.org/xen-project-summit/), the yearly gathering of the Xen community, in Lisbon, Portugal, on June 4-6, 2024. We gave the Keynote, titled [Unikraft Has Arrived: The Lightweight, Fast, Usable Solution for Cloud Deployments] (https://docs.google.com/presentation/d/1bOskgOIW5P0yQjybuiEqWolXwuCoTzwBy5e_OqGoRi8/edit?usp=sharing).

We also headed the "Xen and Unikraft (and unikernels)" design session, where we captured insights in improving Unikraft's Xen support and where we clarified use cases for Unikraft for Xen (such as stub domains and Qubes OS).

#### GSoC'24 Projects

Unikraft GSoC'24 projects have been announced!
[5 projects](https://unikraft.org/blog/2024-05-10-unikraft-gsoc24) are currently under way in the Unikraft community:

The 5 applicants, and their projects are:

**[Mihnea Firoiu](https://github.com/Mihnea0Firoiu) from [POLITEHNICA Bucharest](https://www.upb.ro/en) in Bucharest, Romania**

* Project: Linux x86 Boot Protocol Support
* Mentors: [Ștefan Jumărea](https://github.com/StefanJum), [Răzvan Deaconescu](https://github.com/razvand), [Michalis Pappas](https://github.com/michpappas)

**[Yang Hu](https://github.com/huyang531) from [University of Toronto](https://www.utoronto.ca/) in Toronto, Canada**

* Project: Synchronization Support in Internal Libraries
* Mentors: [Răzvan Vîrtan](https://github.com/razvanvirtan), [Radu Nichita](https://github.com/RaduNichita), [Marc Rittinghaus](https://github.com/marcrittinghaus)

**[Ujjwal Mahar](https://github.com/UjjwalMahar) from [Sharda University](https://www.sharda.ac.in/) in Greater Noida, NCR, India**

* Project: Supporting User-provided, Long-lived Environmental Variables for Unikraft Builds
* Mentors: [Cezar Crăciunoiu](https://github.com/craciunoiuc), [Luca Serițan](https://github.com/LucaSeri), [Alexander Jung](https://github.com/nderjung)

**[Maria Pană](https://github.com/mariapana) from [POLITEHNICA Bucharest](https://www.upb.ro/en) in Bucharest, Romania**

* Project: Multiboot2 Support in Unikraft
* Mentors: [Cristian Vijelie](https://github.com/cristian-vijelie), [Sergiu Moga](https://github.com/mogasergiu), [Michalis Pappas](https://github.com/michpappas)

**[Sriprad Potukuchi](https://github.com/procub3r) from [PES University](https://pes.edu/) in Bengaluru, India**

* Project: UEFI Graphics Output Protocol Support in Unikraft
* Mentors: [Sergiu Moga](https://github.com/mogasergiu), [Răzvan Vîrtan](https://github.com/razvanvirtan), [Michalis Pappas](https://github.com/michpappas)

Congratulations Mihnea, Yang, Ujjwal, Mia, Sriprad! 🥳
