SerenityOS: Year 3 in review

Hello friends! :^)

Today we celebrate the third birthday of SerenityOS, counting from the first commit in the git repository, on October 10, 2018.

Previous birthdays: 1st, 2nd.

What follows is a list of interesting events from the past year, mixed with random development screenshots and also reflections from other developers in the SerenityOS community.

# Introduction to SerenityOS

SerenityOS is a from-scratch desktop operating system that combines a Unix-like core with the look&feel of 1990s productivity software. It's written in modern C++ and goes all the way from kernel to web browser. The project aims to build everything in-house instead of relying on third-party libraries.

I started building this system after finishing a 3-month rehabilitation program for drug addiction in 2018. I found myself with a lot of time and nothing to spend it on. So I began building something I'd always wanted to build: my very own dream OS.

Parts of my development work is presented in screencast format on my YouTube channel. I also post monthly update videos showcasing new features there.

# 2020-12-06: Working on Reddit support in LibWeb

Building a browser takes time, and there's a lot of unglamorous work like figuring out why things don't align right. Fortunately it's also really fun!

# 2020-12-20: Interview on CppCast

I went on the CppCast podcast with Jason Turner and Rob Irving to talk about SerenityOS.

It was my first time doing an interview and I was really nervous about it, but it turned out very okay!

# 2020-12-20: The 2020 HXP CTF

SerenityOS was once again featured in the HXP CTF. After being in their 2019 CTF, we spent a whole bunch of time beefing up system security, and it definitely helped: This time, only 1 team was able to find an exploit, compared to 6 teams in the previous CTF!

Write-ups & exploits from the event:

- yyyyyyy found a kernel LPE due to a race condition between execve() and ptrace()
- ALLES! CTF found a kernel LPE due to missing EFLAGS validation in ptrace().

# 2021-01-06: Reading "Hackles" on SerenityOS

I was very happy to get the classic Unix geek webcomic Hackles working in Browser.

# 2021-01-10: LiveOverflow videos about SerenityOS

At the start of 2021, hacking YouTuber LiveOverflow published a series of videos about SerenityOS, looking into exploits against the system.

All SerenityOS related videos from LiveOverflow:

- Kernel Root Exploit via a ptrace() and execve() Race Condition
- Reading Kernel Source Code - Analysis of an Exploit
- How CPUs Access Hardware - Another SerenityOS Exploit

# 2021-02-11: vakzz's full chain exploit

William Bowling (vakzz) released the first ever full chain exploit for SerenityOS, combining a browser bug and a kernel bug to get remote root access via opening a web page!

Check out vakzz's excellent write-up for a step-by-step walthrough.

# 2021-02-13: SerenityOS developer interview: Linus Groh

I wanted to introduce my YouTube audience to more of the SerenityOS developer community, and Linus became the first guest in my developer interview series!

It was really nice to shine a light on someone else doing great work on the project.

# Developer reflections: Linus Groh

One of my favorite aspects of the past year of SerenityOS development is the overall progress on the browser! There's still a ton of work to do, but we're starting to get more and more websites into a recognizable shape - compared to a year ago, the number of blank pages and crashes on load is reduced considerably.

It's also one of the most collaborative subsystems: everything from improving spec compliance in our JavaScript engine and adding some basic optimizations to implementing countless Web APIs, and continuous work on CSS and DOM has been a team effort. It's great to see everyone get comfortable, explore, and eventually become experts in their favorite topics of browser and JS engine development!

It's been so much fun building all these things together, and I'm excited to see how far we can get in another year :^)

# 2021-03-06: Classic game "port": Diablo

DevilutionX is a reverse engineered "port" of the classic game Diablo. I ported it to SerenityOS and captured the process in a video. To date, this is my most viewed video and thousands of people discovered the project through this video.

I also finally beat the game!

# 2021-04-01: A new direction for the project

On April 1st, I posted a video announcing a new visual and spiritual direction for the SerenityOS project. Most people got the joke :^)

# 2021-04-10: Opening a SerenityOS Discord server

We decided to try out Discord after seeing how it was used to great effect in the Zig language community.

It's been a huge success! While our IRC channel peaked at about 170 users, we've got well over 4000 members on Discord, and it's helped us reach new levels of collaboration that were simply not possible with IRC.

It has also spawned an extremely nerdy culture of yak-related memes.

# 2021-04-18: Interviewed on "Systems with JT"

Programming language wizard JT invited me for an live interview about SerenityOS and everything around it. It was my first live interview, and I was kinda nervous but I think it went well!

JT also did a heartwarming video review of SerenityOS back around Christmas.

# 2021-04-26: More project maintainers

In the interview with JT, one of the things that came up was my own scalability as a project maintainer. Up until this point I had been doing all the PR review and merging myself.

After talking about it with JT, I realized that I needed to ask for some help from a handful of trusted contributors. It was scary to give up a bit of control, but in retrospect it's one of the best decisions I've made. :^)

At the time of writing, we now have five maintainers in addition to myself (in alphabetical order):

- Ali Mohammadpur
- Brian Gianforcaro
- Gunnar Beutner
- Idan Horowitz
- Linus Groh

They each bring their own expertise and passion to the project, and they've been doing a great job at keeping the project moving forward while growing.

# 2021-05-16: Some GUI face-lifts

Sometimes I like to pick out a part of the GUI that is particularly weak and spend some time on improving it. Here I was working on the PixelPaint application, and also the system shutdown dialog.

# 2021-05-27: Linus gets on GitHub Sponsors

Linus becomes the second person to accept sponsorships for his SerenityOS work. More people getting sponsored to work on SerenityOS is super cool!

# 2021-05-28: I quit my job to work on SerenityOS full time!

As of May of 2021, I'm receiving enough in donations to be able to support myself while working full-time on SerenityOS! I wrote a blog post about it here and people were very supportive around the web.

I'm extremely grateful for all the support, and it's super exciting to be able to focus on this full time! Massive thanks to everyone who has supported me over the years! If you would like to help me out as well, check out the links at the bottom of this page.

# 2021-06-12: Interview on Zig SHOWTIME!

I was a guest on the Zig SHOWTIME variety show from the Zig language community. The theme was "tech, taste and soul" and the interview lasted almost 3 hours. Exhausting but fun!

# 2021-06-30: 64-bit mode activated!

Up until this point, SerenityOS was a 32-bit x86-only system. Then came x86_64, much thanks to the hard work of Gunnar Beutner who decided that the port was going to happen, and then didn't stop until it was up and running!

# Developer reflections: Brian Gianforcaro

The past year of Serenity development has been super exciting! One of my favorite things to happen was the bring up of the x86_64 Kernel. Andreas started making baby steps in Feb 2021, followed by others contributing additional fixes, until around Jun 2021 when Gunnar Beutner started contributing tons of patches and with the help of many others got the system booting and running on x86_64. In my mind this was a significant symbolic step for the project and the community, onboarding another architecture makes the system a bit more real in my mind.

From the community perspective I found it very inspiring how Gunnar just took the lead and started fixing issues left and right. The community saw the momentum and started working on fixes as well, and everyone together got the system running.

I wish Andreas, the SerenityOS project and community, continued success and here's hoping for another fruitful year of fun and progress. With the nascent aarch64 port under way by Nico Weber, and the countless other exciting things folks are working on, I'm excited to see what the next year has in store! :^)

# 2021-07-08: SerenityOS Office Hours

After an interesting back & forth "discussion" with my YouTube audience that started with the question "Am I losing touch with the audience?", I decided to put some serious effort into connecting with the audience.

After some experimentation, I finally arrived at the SerenityOS Office Hours format. This is a weekly Q&A livestream that I do every Friday at 4pm Swedish Time. People are invited to ask any technical or non-technical question about SerenityOS and we dig into whatever topics come up. It has been well-received and I've really enjoyed being able to answer questions interactively!

Check out my stream archive on YouTube. (And come say hi when I'm live some time!)

# 2021-07-08: A world map of SerenityOS hackers

Linus created a collaborative map of SerenityOS developers & users around the world.

# 2021-07-20: TrueType renderer improvements

While I'm a big fan of bitmap fonts personally, I did spend some time working on our TrueType renderer, fixing up things like vertical alignment and glyph sizes.

I also did some work to support the Microsoft Tahoma and JetBrains Mono typefaces, seen in this screenshot!

# 2021-07-26: Building a "Settings" app

Until this point, all the various settings dialogs were scattered around the system menu. I decided it was time to collect them in a simple Settings application instead. I think it turned out quite nice!

# 2021-07-26: SerenityOS developer interview: Ali Mohammadpur

I did another developer interview video! This time with Ali, who is behind many of the subsystems in Serenity (including TLS, line editing, the spreadsheet, and more!)

# 2021-08-10: Working on multi-core stability

Multi-core support is still immature in SerenityOS, but we have been making some strides forward in this area. In this screenshot, I'm successfully running Quake II using 2 CPU's simultaneously.

# 2021-08-18: ArsTechnica reviews SerenityOS

In mid-August, ArsTechnica ran a feature article on SerenityOS. This came out of nowhere and was a lot of fun!

# 2021-08-29: Showing SerenityOS to my nephew

My nephew called me on Skype while I was hacking on something, and I asked if he wanted a tour of the operating system. He said yes, and I got this sweet screenshot of him excitedly seeing me beat our Breakout game!

# 2021-09-12: 500 contributors on GitHub!

It's wild how many people have contributed to the project at this point!

# 2021-09-18: Linus Groh interviewed on CppCast

It's been so cool to see Linus's journey with SerenityOS, from not knowing C++ at all 18 months ago, to being interviewed on a major C++ podcast.

# 2021-09-19: Reading the HTML spec

It's a pretty cool milestone when your browser engine is strong enough to download and display the HTML spec itself.

# Developer reflections: Idan Horowitz

One of the main subprojects in LibJS that was being worked on in 2021 was support for the stage 3 Temporal proposal, which aims to replace the old and awkward Date API with a more modern, unified and fully-featured interface.

As a result of the efforts of many contributors (with some of the most notable ones being Linus Groh and Luke Wilde) Serenity's LibJS contains the most fleshed out Temporal implementation out of all the popular Javascript engines.

# 2021-10-02: Browser performance work

Lately I've been doing a ton of work on browser performance, trying to bring it to a point where it can display complex pages in a somewhat reasonable time.

Here I am using Profiler to examine what appears to be memory allocation performance in our regular expression engine.

The profiling system has matured quite a bit during the last year. It now has the ability to capture full-system profiles, and we've got more visualizations to aid in performance analysis. :^)

# Monthly update videos

The tradition of the monthly SerenityOS update video is alive and well, ever since my first-ever update video in March 2019.

Something new this year is that for the last couple of videos, I've been joined by Linus in the videos. The sheer amount of things happening month-to-month was getting hard to cover by myself, and it's great to share the stage with someone else who cares deeply about the project as well.

- SerenityOS update (October 2020)
- SerenityOS update (November 2020)
- SerenityOS update (December 2020)
- SerenityOS update (January 2021)
- SerenityOS update (February 2021)
- SerenityOS update (March 2021)
- SerenityOS update (April 2021)
- SerenityOS update (May 2021)
- SerenityOS update (June 2021)
- SerenityOS update (July 2021)
- SerenityOS update (August 2021)
- SerenityOS update (September 2021)

Check out the playlist on YouTube for the full archive!