Blog posts

2023

ARM Permission Indirection

3 minute read

Published:

In 2022, ARM introduced a new way to control memory permissions. Instead of directly encoding the permission in the Translation Table Entry (TTE), fields in the TTEs are used to index into an array of permissions specified in a register. This indirection provides greater flexibility, greater encoding density and enables the representation of new permissions.

Build Kernel Module from a Customized Kernel

1 minute read

Published:

In recent projects, we need to hack on Linux Kernel with various customization on multiple architectures. However, common distros like Fedora/Debian/Centos will not provide compatible kernel development headers (staffs under /lib/modules/$version) required by building kernel modules.

2022

Run Debian in QEMU

2 minute read

Published:

One need we recently met was to directly trigger syscalls in QEMU. To achieve this, we have to run Linux with pre-installed dev tools such as vim and gcc, and most importantly, package managers like apt. Thanks to debootstrap, such a subsystem can be setup within minutes.

Faster Compression by zstd

less than 1 minute read

Published:

Recently I was required to transfer a bulk of data containing millions of sparse files, where the archive and compression algorithms became a must yet bottleneck to my server. A compression algorithm with full parallelism, zstd, can better address the problem. Some tips are recorded in post.

LaTeX for Fun and Profit

2 minute read

Published:

LaTeX plays an essential role in computer science academics. A decent layout leads to the entertainment of both reviewers and ourselves. Believing this, I write the following to demonstrate some tips of LaTeX best practice.

Install Sogoupinyin Input Method on Ubuntu 22.04

less than 1 minute read

Published:

In Ubuntu 22.04 with GNOME 42, Wayland is enabled by default as the windowing system. Yet the current instructions are mostly based on Ubuntu lower than 20.04, which chooses X11 as windowing system. X11 configurations are somehow not that compatible on Wayland. This is also a reason why input method does not work on Ubuntu 22.04.

Get Yourself a Win10 Guest in QEMU-KVM

3 minute read

Published:

In order to use certain softwares, I have to prepare myself a win10 virtual machine. However, common virtual machine software (VMWare / Parallel Desktop) has no Linux support, while VirtualBox is not powerful enough. That drives me to an alternative: QEMU-KVM.

2021

Build Yourself a GitLab Server with CI

2 minute read

Published:

GitLab in a docker is one of the minimal way to self-host a Git server with customized CI runners. Thanks to well-organized docker image offered by GitLab, this explore seems a pleasure rather than a nightmare.