Welcome!

Here you'll find my notes on life, research, and whatever else tickles my fancy.


Mysterious Lag Spikes and Faulty Switches

Thu 01/23/14   12:06  in  technical

My residential internet experience has always been poor, so when I started observing bizarre network behavior a few months back I attributed it to upstream problems and wrote it off with a sigh. The issue persisted however, so over the winter break I decided to sit down and tackle it once and for all.

Tracking down the source of the issue was an interesting adventure, and ultimately the problem was in the last place I thought to check: a pair of TEG-S80g unmanaged gigabit switches made by TRENDnet.

Do not buy! :)

Details follow.

Read Full Post

Catching pointer overflow bugs

Mon 11/18/13   18:05  in  technical

In all varieties of C/C++, pointer arithmetic is undefined if it overflows. That is to say the following example:

void invalid(char *p) {
  char *q = p + 1;
  printf("%p\n", p - (uintptr_t)q);
}

invokes undefined behavior as it causes the pointer value to wraparound to the equivalent of -sizeof(char), which is 0xffffffffffffffff on my 64bit system.

Unlike integer overflows which can be dangerous or benign regardless of intention (ICSE12 [1]), pointer overflows are very unlikely to be intentional and may be the source of a more serious bug resulting in incorrect behavior or program crashing.

Read Full Post

Kernel hacking: My very own BSOD

Tue 09/24/13   15:58  in  technical

While working on hacking the FreeBSD kernel for a research project, I of course have crashed things many times. Hooray for VM’s.

However, this latest time I’ve managed to really mess things up. Instead of some esoteric message in the logs, the result was the following being written to the console:

nonsense kernel console output

Nonsense Kernel console output

Hopefully those of you who’ve hacked on kernels previously will appreciate the "wut" moment you get when your screen looks like this instead of acting as expected :).

Read Full Post

Bootswatch Theme Selector

Sun 08/25/13   21:54  in  technical

Despite my passion for light-on-dark themes, not everyone finds them as readable and enjoyable as I do. To address these concerns I investigated what it would take to add a drop-down to this website to enable dynamic selection of themes by the user.

bootswatch theme dropdown

Bootswatch Theme Dropdown

The relevant code is given, but for those interested in a complete example take a look at the website github [1].

Read Full Post

Easy Website Tuning

Sun 08/25/13   20:12  in  technical

Having recently moved to Pelican [1], I found myself interested in seeing how I could coerce my server (runing Apache [2]) into taking proper advantage of the bulk of the website being static.

There’s lots of information on the subject out there, but below I describe the few easy changes I made to greatly improve performance of my website.

Read Full Post