Thursday 29 May 2008

GNU C extensions

GNU C has many extensions which make the programmer's life easier-... or not. But the resulting code is more efficient! One of these extensions is the compiler attribute preceding a function header specifying certain function behaviour. For example, a function can be forced to always be compiled inline with __attribute__((always_inline)). More than one attribute specifier can be used within the parentheses; full attribute syntax can be found here. Attributes can also specify the way the compiler treats types and variables.

Contiki employs attributes in its protothreading system (see core/sys/pt.h) for specifying return addresses via labels (core/sys/lc-addrlabels.h). The preferred alternative is a coroutine-based method (/core/sys/lc-switch.h) using switch-case control structures and the __LINE__ C macro.

Wednesday 21 May 2008

RFID firewall

A quick description of RFID Guardian, a firewall for RFID tags. Development was done using the Triton PXA270 (Intel Xscale) devkit. Homepage of the project is here.

Monday 19 May 2008

LayerOne 2007

Instructive and funny video from LayerOne 2007 about commonly used physical access control technologies. The Wiegand, proximity and RFID protocols are covered, with the focus being on hacking a common Wiegand implementation (28:50). An honourable mention must be made of the concealed bar-code card as being one of the most "embarrassing" attempts at security through obscurity. (As the presenter said: "If you ever find out someone working for you implemented such a system, fire them. Then shoot them so they don't infect the rest of us.")

More good talks focussing on privacy matters: RFIDiots and Anti-Forensics.

Wednesday 14 May 2008

Linux talks

Videos from the Embedded Linux Conference, Mountain View, USA, Apr. 2008 are now available. There is a vast array of topics, including "Every Microamp is Sacred - A Dynamic Voltage and Current Control Interface for the Linux Kernel", "Using a JTAG for Linux Driver Debugging", and "UME - Ubuntu Mobile and Embedded". Site seems to be slashdotted for now, but hopefully it'll get back to its feet soon.

Friday 9 May 2008

The cruise starts

One of my projects involve dynamic updating of kernel code on sensors running the Contiki OS. It seems there are many ways to do this, as shown in this presentation and supporting .pdf by Adam Dunkels et al. The Contiki layers and linking relationships are explained in detail in this and this document.

Wikipedia has a good overview of ELF, a very popular structure for dynamically linked modules. A hallo-world example from LinuxJournal (1995) is also a good starting point. This excellent tutorial shows how to use ELF when compiling really small ASM files (includes a specification of ELF), while this site explains in detail how the ELF structure is implemented using C libraries.