June 22, 2012

Patching vmware vmnet module for Linux 3.2.*

When installing vmware player 4.0.4, I had the nice surprise of finding out that the vmnet kernel module would not properly compile while starting the vmware service. 2012-06-22T15:34:41.039+01:00| vthread-3| I120: Building module vmnet. 2012-06-22T15:34:41.040+01:00| vthread-3| I120: Extracting the sources of the vmnet module. 2012-06-22T15:34:41.046+01:00| vthread-3| I120: Building module with command: /usr/bin/make -j -C /tmp/vmware-root/modules/vmnet-only auto-build SUPPORT_SMP=1 HEADER_DIR=/lib/modules/3.2.0-25-generic/build/include CC=/usr/bin/gcc GREP=/usr/bin/make IS_GCC_3=no VMCCVER=4.6 2012-06-22T15:34:41.835+01:00| vthread-3| I120: Failed to compile module vmnet! Manually directly compiling the module, we see a couple of incompatibility with the kernel header definitions ... Read more

November 5, 2008

Wrap your shell commands

One of the most annoying matter I have met when administrating a server was following and fixing messes other users (who happen to have root password) would do on the server. Random users with root passwords often know two things… “sh” and “history -c”… and of course “I didn’t do it”. Now, while it is important to keep logs of activities on the server, it is even better to be able to pull up logs of every single commands entered plus their arguments. ... Read more

October 14, 2008

How to create a linux system call

Creating a system call in the kernel to be used by a user-space application isn’t that exotic but requires three basic steps. The first step is to create the function, to update the header files and to update the system call table. We will create the function with the asmlinkage modifier, which tells the compiler to pass all function argument on the stack. A simple system call function could be ... Read more