Two C Techniques: Typedef and Switch by "Symbol"

First to summarize the usage of typedef in C/C++. The usage can be categorized into three class:

  1. to indicate what a variable indicates
  2. to simplify a declaration, i.e. struct, class
  3. using typedef with pointers
  4. using typedef with typecasting

Here are some tips:

  1. basically, typedef is define a more self-explained …

First Paper Is Submitted, Cheers!

On last Thursday, I had submitted my first paper in system security, the conference is USENIX. Though it is not very solid results. I finally got it submitted. Many thanks to my adviser and Mihai. Their invaluable advice always inspiring.

I am going to list some deficiencies that I discovered from me.

  1. I am always …

Linux Kernel Module ABC

Install a kernel module in Linux

  1. If new feature needed: kernel module daemon kmod will exec the modprobe. modprobe is passed in the form of a name (softdog or ppp) or generic string identifier (char-major-10-30). If modprobe is handed a string identifier, it will look for the string in the file /etc/modprobe.conf. …

Buffer Overflow Exercise in Ubuntu

In Ubuntu system, there is some protection scheme deployed to avoid buffer overflow attacks. Before deploying the attack, we should disable all the kernel functionality that protect the system from buffer overflow.

The program I am going to use is a small piece of c code that uses a strcpy function. The program is …

Pointer Notes

Pointers are very important, this post is a learning note form the cplusplus.com pointer section as well as the Stanford CS library booklet Pointers and Memory (By Nick Parlante, Copyright ©1998-2000, Nick Parlante). The first topic about pointer is how to declare them, how to dereference them, and how to assign a …