Fun with SSH (and possibly other types of) attacks

For some strange reason I completely fail to understand, there are people out there trying to gain root access of the machine where this blog is hosted. The most common type of attach is a dictionary attack to my SSH server, which can be easily detected by just taking a look to /var/log/auth.log where all … Read more Fun with SSH (and possibly other types of) attacks

RAII and Lock-Free Reference Counting

Resource Acquisition is Initialization (RAII) is a very useful design pattern that couples quite well with Lock-Free Reference Counting. I typically use lock-free reference counting for objects stored in shared containers, such as hash tables accessible from multiple threads. This shared containers implement a getter method that increments the object reference count before returning it. … Read more RAII and Lock-Free Reference Counting

Expected and Average Values

Is the expected value of a random variable equal to the average of a bunch of trials? Most people (including myself) assume so, but I just wanted to double-check I was not doing any stupid assumption. Let’s outline how are the expected value and the average (arithmetic mean) are related.

Building an ARM Cross-compiler in Debian GNU/Linux

I am getting sort of interested in the ARM architecture because it might have a relatively large potential for computer architecture research. The first advantage of the ARM architecture is its RISC-like ISA, so ARM instructions are not likely to be converted to micro-ops before being executed. The second interesting issue of ARM processors is … Read more Building an ARM Cross-compiler in Debian GNU/Linux

Lock-Free Reference Counting

Often time, when developing multi-threaded applications, we found the following pattern: a central repository of objects, say a map, whose items are concurrently accessed, created, and destroyed by several execution threads. The key to correctly implement this pattern is to realize that objects within the map must not be destroyed while other thread is using … Read more Lock-Free Reference Counting