Virtual function table (A.K.A vtable) is the key to manage virtual function which is a key mechanism to support polymorphism in C++ language. VTable is used to support dynamic dispatch or runtime method binding in C++. At the same time it is a popular target of malicious programmers to execute their malicious behavior on the system. Attacker exploits … Continued
I was trying to create a simple camera application in android. For my application purpose I needed to display the camera preview. So I followed android developers site and also some other blogs to create a camera preview in android. So everything was working except there was one major bug. If I lock my device … Continued
If you are a Linux user for your most of the research work and you come upon the task of debugging Windows kernel, but don’t want to switch to a Windows platform for that, QEMU can help you. We can create a virtual serial connection between two QEMU VM. One VM acts as the debugger … Continued
The effect of a bug in the kernel is catastrophic and may lead to system crash. Kernel debugging is an important step for kernel developers to find out bugs or debugging kernel execution. Many developers use virtual machine while working on kernel level. QEMU is a famous virtualization tool among the kernel developers. In this tutorial … Continued
This is the second part of our char device driver development tutorial. In part1, we learnt how to write a simple char device driver that supports read or write functions. We dynamically assigned a major number for our driver and using the assigned major, we manually created a device file in /dev directory.
In this post we’ll take our 1st step of writing a char device driver for Linux. In our previous post, which I would recommend you to read unless you already did, we created a very simple kernel module. Other than dumping some log message, it didn’t do anything fancy. In this post we’ll create a char device driver … Continued
We already know we have to divide an array into two sub-array for quicksort algorithm. Here I’ll describe how this partitioning actually works. If you want to know about how quicksort works, follow my other post on quicksort working principle. I followed Introduction to Algorithms, 3rd Edition (MIT Press) for writing this tutorial.
QuickSort is the most elegant sorting algorithm with an average case time complexity of O(nlogn). The main idea behind quick sort is divide and conquer. I’ll try to explain how this divide and conquer strategy works for quick sort. This writing is a gist from Introduction to Algorithms, 3rd Edition (MIT Press), a cool book for … Continued
Finding an integer pair with given sum is a very familiar problem in algorithm community. The general problem is: given an array of integer numbers and a given sum, how do we find out a integer pair with given sum?
In previous tutorial we learned how to write a basic kernel module for Linux. This tutorial will explain how we can pass parameters to kernel module using command line arguments. This writing is greatly inspired by The Linux Kernel Module Programming Guide, a great book for device driver developers.