Identify a bug in the Linux kernel module

I am marking Michael's as he was the first. Thank you to osgx and employee of the month for additional information and assistance. I am attempting to identify a bug in a consumer/produce kernel module. This is a problem being given to me for a course

How to find a dentry of an inode / pathname?

I am working on a module to read a files xattributes on open. I have hooked the sys_open and due to this I need to get the dentry of the file without opening the file. In brief I have the inode and the absolute path but having trouble to figure out;

Fragmentation in modern file systems

I was tinkering with Pintos OS file system and wonder: How do modern file systems handle fragmentation issue, including internal, external and data?OK, so it's file fragmentation you are interested in. The answer is it depends entirely on the file sy

Cross compilation module with arm-eabi-gcc

I have a video module and I am compiling with arm-eabi-gcc cross compiler. I used following command to compile $ arm-eabi-gcc -O2 -DMODULE -D__KERNEL__ -W -Wall -isystem /lib/modules/uname -r/build/include panel-xxxxxxx.c. I got the following error I

do not understand the mechanism of free_netdev

I study network-device-driver recently. But somehow not understand free_netdev this function. I have read the following link: Possible de-reference of private data using net_device The answer says that when free the network device, the private data w

Preserve the state of the processor pipeline

Is there any situation where the state of the processor pipeline (with already decoded or prefetched instructions) is saved and subsequently reloaded after resumption during a thread sleep/ context switch / interrupt etc.? (May be as a optimization).

Linux kernel dynamic debug settings - persist on a reset

With Dynamic Debugging enabled in the Linux Kernel, I am able to control which prints show up by writing to /sys/kernel/debug/dynamic_debug/control. However, It seems that a reboot resets this file to its default settings (all prints disabled). Is th

Can an open hold stay for a long time without being read?

I'm opening a socket to a server and then sleeping, possibly for a very long time (days). The process is single-threaded so I can't have a thread dedicated to managing the socket. The socket should stay alive. I'm assuming the server does not send an

Understand the process of receiving network packets

I started to learn Linux Networking and packets filtering. In the iptables documentation it is stated that: If a packet is destined for this box, the packet passes downwards in the diagram, to the INPUT chain. If it passes this, any processes waiting

What is the difference between U-boot.bin and uImage.bin

I am confused between the u-boot.bin and uImage.bin. I guess uImage.bin is nothing but the compressed version of u-boot.bin and it size should be less than u-boot.bin. But in my build environment what I found is u-boot.bin size is lesser than uImage.

Implementing kernel bypass for a network adapter

My situation: I would like the data received on a network card to reach my application as fast as possible. I have concluded that the best (as in lowest latency) solution is to implement a network stack in my user space. The network traffic can be a

How to execute the shell command in kernel programming?

I want to use system() function of stdlib.h in my c code. I am actually working on kernel programming. Whenever i want to use system() in it, it gives error to stdlib.h saying no such file found.It's simple! #include <linux/kmod.h> char * envp[] = {

Linux Kernel Crypto Guide

I am working on a kernel module to encrypt/decrypt an input in kernel. I am thinking about using the AES algorithm implemented in crypto.(Any other suggestions for an efficient algorithms that can be found in Linux crypto?) I've searched for guides o

How to check the 32-bit / 64-bit kernel for Linux

I need to write a bash script where i have to check whether the Linux kernel is 32 bit or 64 bit. I am using uname -a command, and it gives me x86_64 result. But I believe I can not use it in the generic way because result may differ if some one usin

uboot- MMC not SDcard

I am trying to get a linux kernel with a linux rootfs running on an imx51 Freescale board. I compiled linux kernel, root file system and u-boot and copied the image to SD-card: partition 0: boot partition 1: rootfs and linux kernel However I have the

How to start Linux & amp; programming device drivers

I am android application developer. I want to gain knowledge of linux systems & device drivers programing also. Where should I start?? Can any one suggest some books or links to tutorials...Actually, there are not a lot of literature about AOSP progr

An alternative for tasklist_lock in a module?

For learning purposes I would like to iterate through all the tasks in a module and output different information about them. For this task I need to lock the list of all tasks (I'm also unsure if I should do it.). I've seen some example in the kernel

Get guest additions vbox for android x86

I am running Android-x86 on virtual box. And i want the pointer integration enabled which needs VBox Guest additions to be installed on the guest os. I have searched a lot, but what i have got is, one has to compile guest additions with android-x86 k

Understand the linux planner

I am new to linux kernel and low level programming. I wanted to know how linux scheduler is supposed to be O(1) in time complexity. I came across the following article which is very informative but I have a problem understanding the pargraph I have r

Linux 2.6.31 Scheduler and multithreaded jobs

I run massively parallel scientific computing jobs on a shared Linux computer with 24 cores. Most of the time my jobs are capable of scaling to 24 cores when nothing else is running on this computer. However, it seems like when even one single-thread

How to load / unload a Linux kernel module with a Java program?

I'm looking to load and unload a linux kernel module from my Java program. I initially tried doing it by using ProcessBuilder to run the commands, however it fails because the program doesnt have root access. Running my program as root also yields th