creating a function wrapper in golang

Here is a snippet that allows one to create a ‘wrapper’ function that you can input a generic function and parameters too in golang. callme takes a function and a variadic set of parameters. By using the reflect library we can properly check number of parameters a function has as well as value types. Finally we use Call to call the function with the processed parameters. A use case for this could be calling a function and allowing for retries or additional checking.

»

signed kernel modules using an auxiliary key

This post explains how to build a kernel and corresponding modules with the following criteria:

»

a simple robotic car

Here is a really cool car robot I built:

»

grub-reboot with submenus

Occasionally it is useful to be able to reboot a machine into an earlier kernel and watching and waiting for the grub menu isn’t always feasible or convenient.

»

flashing coreboot on an x60t

I was gifted a dusty X60t and remembered how it was one of the more well supported targets for coreboot/libreboot. Thus I decided to take it apart and reflash the BIOS. The following articles explains how this is done. Note, that it is possible to flash the BIOS from a booted Linux install; I decided to do things the hard way.

»

building ubuntu kernels with debug symbols

Occasionally it is useful to be able to build a kernel the Ubuntu way with debug symbols. The following is how to install dependencies, clone the tree, and finally build in such a way that ddeb packages get generated.

»

using linux livepatch on ubuntu

Livepatching was introduced in the v4.0 kernel, and now Ubuntu 15.10 has a kernel capable of using this new and exciting feature. This works by using ftrace to redirect kernel function calls to the newly patched functions. In addition mechanisms for hooking into module insertion and removal are used for patching loadable modules. This feature also has sysfs directories for tracking which patches are applied and which functions they modify. With the basics aside, this blog post will show some simple examples of how to livepatch your kernel.

»

linux make deb-pkg speedup

Because I’ve run make deb-pkg so many times, I’ve started to see exactly where it starts to slow down even with really large machines. Observing cpu usage, I noticed that many parts of the build were serialized on a single core. Upon further investigation I found the following.

»

accessing maas database directly

Let’s say you’ve messed up your MAAS installation and have no idea how to recover data about your nodes. Have no fear, you can access the django managed database directly.

»

qemu/kvm guest debugging

Occasionally it is useful to debug a running guest VM’s kernel. Setup your host machine for virtual machine hosting with QEMU/KVM, and add ddebs to your host system using this wiki.

»