RSSAmplifier

Blog

Georg's Log

gms.tfRSS feed ↗36 posts

Latest posts

Better Datamash Build Story with Meson

This article is a small case study on introducing the Meson build tool into a legacy Autotools and Gnulib centric code base, i.e. the GNU Datamash project. With Meson, the result builds twice as fast and configures one order of magnitude faster while only requiring a few hundred lines …

Injecting Code into a Linux Process

Say - entirely hypothetically - we know a shell script that is executed with root privileges via sudo and we found a way for normal users to convince it to call their own code. For demonstration purposes it then would be nice to have code that invokes a local root shell, ready …

The curious case of nanosleep vs. hr_sleep

This weekend, I finally got around reading a bookmarked paper that proposes an improved nanosleep: Faltelli, Marco & Belocchi, Giacomo & Quaglia, Francesco & Pontarelli, Salvatore & Bianchi, Giuseppe. (2021). Metronome: adaptive and precise intermittent packet retrieval in DPDK. In the following I document a few notes. The Papers ¶ At page 4 I'm asking …

Blocking Audio Ads

This article describes an approach to blocking ads in audio files and introduces software that implements it. Motivation ¶ The modern web is unbearable without a good ad-blocker such as uBlock Origin . Unfortunately, the online marketing industry, while destroying the web, providing creative distribution networks for malware and disinformation campaigns there …

Shift Typing

This article introduces shift-tutor , a Linux program that filters shift key events to improve or verify touch typing skills. Rationale ¶ Most keyboards contain two shift keys, i.e. one located on the left bottom and the other on the opposite side: Source: Mliu92 , ANSI US QWERTY (Windows, split + rotated) , CC …

Fosi Audio TDA7498E Amplifier Review

Recently, I was in the market for a Class-D amplifier to replace an aging model. This article reviews the very compact Fosi Audio TSA7498E 2 channel amplifier I bought from a China based business, via Amazon. tl;dr: Can't recommend, use something better. Motivation Selection Review The (mostly) Good The …

Scanning I2C addresses

I2C is a simple open-drain bus that is popular for connecting devices to microcontrollers (MCUs) , such as sensors, RTCs , displays etc. Devices on the I2C bus are addressed by 7 bits and the bus data and clock lines are pulled-up by a set of pull-up resistors. A good first test …

Measuring PWM Signals with a Pokit Meter

This article describes how to measure a pulse-width-modulated ( PWM ) signal using the Pokit Meter device. The Pokit Meter is a very small digital multimeter (DMM) like device that can be interfaced over Bluetooth Low Energy (BLE). Due to its design and small form factor it comes with many limitations, but …

Getting started with the GD32VF103 RISC-V Microcontroller

The GD32VF103 is an inexpensive 32 bit RISC-V CPU that integrates a bunch of peripherals. In other words, it's a cheap RISC-V microcontroller (MCU). This article describes how to hook it up, to set up an development environment and do some first steps with its peripherals. Characteristics Development Boards Assembling …

On the Costs of Syscalls

It's well known that syscalls are expensive. And that software mitigations against CPU bugs (such as Meltdown) even have made them more expensive. But how expensive are they really? To begin to answer this question I wrote a small micro-benchmark in order to measure the minimal costs of a syscall …

The Rise of Meson

More and more open source projects seem to switch to the Meson build tool, in the last years. In an attempt to quantify this development I looked at the build tools usage by Fedora packages, during the last 14 years. About Meson ¶ Meson is a build tool with good C …

Perfect Hashing

The beauty of perfect hashing is that you never have to deal with any collisions during item lookup. I recently created libphashtable , a perfect hashing hash table library for C/C++ which focuses on minimizing item lookup latency jitter. This article presents benchmarking results that show how its lookup times …

Deploying Full Disk Encryption in the Cloud with Ansible

Deploying a new virtual machine 'in the cloud' is simple enough and fast. As long as one doesn't need to setup an encrypted root filesystem. This article shows how to automate the setup of a Fedora system with an encrypted root filesystem remotely - 'in the cloud' - on e.g. a …

Deploying SSH Host Keys with Digital Ocean Droplets

When deploying a VM in a remote location one might end up in an impossible situation: a VM base image doesn't contain SSH host keys as otherwise the image couldn't be shared between multiple hosts. But if SSH host keys are auto-generated during the first boot one doesn't know their …

Programming with RISC-V Vector Instructions

Perhaps the most interesting part of the open RISC-V instruction set architecture (ISA) is the vector extension (RISC-V "V"). In contrast to the average single-instruction multipe-data (SIMD) instruction set, RISC-V vector instructions are vector length agnostic (VLA). Thus, a RISC-V "V" CPU is flexible in choosing a vector register size …

Announcing MANPATH.be

Recently, I launched MANPATH.be - a site for convenient man page browsing. It provides access to the man pages of different distributions, including Fedora , CentOS and OpenSolaris . The about page concisely describes some of the sites features, e.g. human readable links like f30/3/memcpy , permalinks and various kinds …

The Anatomy of a Firefox Malware Addon

Some time ago, I was contacted to fix a computer running Ubuntu . Basically, after many flawless LTS distribution upgrade the last one failed and made the graphical boot hang hard. Thus, the fix was to backup the home directory, re-install a fresh Ubuntu and restore the home. Color me surprised …

Touch Typing

Getting along without touch typing is possible. But learning touch typing is usually a big productivity boost, reduces stress and may prevent typical keyboard induced health risks . This article describes some learning approaches and optimization opportunities. Getting Started ¶ The first thing to learn is to place the fingers in a …

Configuring SPF to make Google happy

Lately, Google mail servers are getting more extravagant in what mail they accept. Setting up a Sender Policy Framework (SPF) DNS record is a relatively low effort way to get mail though users of the Google mail service. (Those users aren't necessarily identifiable by the Gmail domain as it's also …

Work-related Movies

This article features a watch list of work related movies. A list for getting some peace of mind in the evening after working overtime. Each movie has some relation to a pathological work related setting. Not always on the surface, but more on a deeper layer of interpretation. Some of …

Dtracing Passwords for Fun

Going through an old hardware stash, I've noticed a harddisk that was part of a Solaris test system of mine I disassembled 10 years ago. The disk contains an interesting artifact I implemented at that time: a proof-of-concept for capturing user entered passwords with DTrace . Proof of Concept How to …

NFS VM Cached Read Illustrated

This article illustrates how the virtual memory (VM) subsystem of the Linux kernel is able to cache files that are located on an NFS server. Environment High-Level View Dstat NFS Traffic Closing Remarks Environment ¶ In this small experiment we just need two Linux machines on a local network, where one …

Check CPU Microcode Version on Linux

Debian recently released a warning advisory regarding a hardware bug in the hyperthreading implementation on certain Skylake/Kaby Lake Intel CPUs . It can be mitigated by a microcode firmware update - at least on some models. This article is about checking a non-Debian system for this issue and verifying if the …

Reasons for Rooting Android

A stock Android device is locked down, by default. Rooting is the process of getting access to the root user (think: installing su ). This article lists several advantages of a rooted device. NTPsync Create USB Mass Storage devices Simple Backups Separate Disk Encryption Password Side Note: Rooting vs. Unlocking vs …

Fedora as Grml replacement

Grml is a Linux Live CD distribution geared towards system administration tasks and other console work. Unfortunately, its development has slowed down in the past years, i.e. the latest stable release is from 2014. In 2017, when dealing with modern hardware, modern features like Btrfs, SELinux etc. this is …

Updating Samsung SSD Firmware in the 21st Century

The firmware updates for the Samsung 840 EVO SSDs come as ISO images which isn't very helpful if your system doesn't have a CDROM drive. It turns out that the ISO images just contain DOS binaries, though. This article describes how to use a FreeDOS USB stick for flashing, instead …

Btrfs requires noatime

Traditionally, UNIX filesystems also maintain the access time (atime) of a file. This is very much an anti-feature because it yields a write operation for each read operation. Which is obviously bad for performance. Since Btrfs is a copy-on-write (COW) filesystem maintaining atimes is even more painful. Thus, a sensible …

Updating the BIOS on a Dell Latitude E7270

Dell distributes BIOS updates for the Latitude E7270 as PE32 Windows GUI executables. It turns out that the BIOS itself is able to extract the firmware images from such executables and to apply them. HOWTO ¶ Get the latest BIOS update executable from e.g. https://www.dell.com/support/home …

When curl sends 100-continue

When sending a POST request with curl it sometimes automatically adds an Expect: 100-continue header. The following summarizes under which conditions curl/libcurl adds this header. Background ¶ The Expect: 100-continue header is specified in HTTP 1.1 and allows the server to acknowledge or reject a POST/PUT request immediately …

Link Layer Discovery Protocol

The Link Layer Discovery Protocol (LLDP) probably isn't the most popular protocol but it can be useful for troubleshooting purposes and for mapping the neighbourhood of a host. Its purpose is basically to send/receive key/value pairs that are of general interest. For example the switch port number the …

Counting CPU Events

This article discusses hardware performance counter measurements obtained for a character search benchmark running on Intel x86 and SPARC hardware . Those results help to explain the big runtime differences between a SPARC T5 system and Intel x86 ones (SPARC being much slower), as well as differences between the different implementations …

SPARC and PPC find benchmark results

The article std::find() and memchr() Optimizations contains benchmark results for an Intel Core i5, an i7 and an older AMD system. This followup also adds results for a relatively recent SPARC system and an older PPC one. SPARC T5 ¶ First released in 2013, the SPARC T5 is a relative …

std::find() and memchr() Optimizations

Assume you need to parse a record based format with flexible width and one-byte delimiters. When using C++, the std::find() STL algorithm is the obvious choice for efficiently locating the delimiters. The idiomatic C solution is to use memchr() . Expectations Sample Code Methods How fast is std::find()? Does …

LD_LIBRARY_PATH considered harmful

The purpose of the LD_LIBRARY_PATH environment variable is to instruct the linker to consider additional directories when searching for libraries. Its valid use case is the test of alternative library versions installed in non-standard locations. In contrast to that, globally setting the LD_LIBRARY_PATH (e.g. in the profile of a …

Shipping Books (in Germany)

There are several products for shipping books in Germany. The 'Warensendung' product may be cheaper for certain books, but they are slowly transported and there is no tracking. The following table compares different attributes and constraints of the products available in the market (last update: 2026-03-22). Company Product € < g w …

On sprintf() Fails

The sprintf() and snprintf() C library functions are commonly used for formatting a string and writing the result into a buffer. But sometimes it is surprising in how many ways sprintf() can be misused. The Ugly The Pitfalls The Bad The Ugly &para; Some enterprise C programs look like submissions to …