maleadt     about     archive

JuliaCon'17

Last week in Berkeley, there was the annual JuliaCon where I gave a couple of talks on the GPU infrastructure I have been working on. Here’s the material from those talks:

Debugging Julia with Address Sanitizer

Address sanitizer is a useful tool for debugging various memory problems, from invalid accesses to mismanagement or leaks. It is similar to Valgrind’s memcheck, but uses compile-time instrumentation to lower the cost.

In this post I’ll explain how to use Clang’s address sanitizer (or ASAN) with Julia. This is somewhat tricky, as the Julia compiler uses LLVM for code generation purposes. Long story short, this implies that all instances of LLVM (ie. the one Julia is compiled with, and the one used for code generation) have to match up exactly for the instrumentation to work as expected.

Click here to read more

Generating bmap information from images

When dealing with disk images, the bmap-tool project is a godsend for writing said images to a physical device. Relying on an accompanying bmap file, bmaptool skips unused data when copying an image. Sadly, only few image providers bundle their images with the necessary bmap information. Even though using bmaptool with plain images still pays off (writing to devices is notably faster than a regular dd), most of its value is lost.

Click here to read more

Raspberry Pi music server

I’ve recently been spending some time on building an enclosure for my Raspberry Pi-based sound system, replacing the ModMyPi case and micro-USB charger while upgrading the audio quality by using a dedicated DAC.

I started from a nice-looking example I found online, which features an inexpensive aluminum enclosure from eBay and a compact switching power supply to get rid of the external charger.

Click here to read more

sudo — local privilege escalation

sudo is a popular program for executing commands as a substitute user, most of the times root. For the purpose of user-friendliness, sudo caches the right to elevate for several minutes. By hooking user-level library calls using LD_PRELOAD and waiting until the user unlocks sudo, we can abuse this caching mechanism and gain elevated access.

Click here to read more