Skip to content

Tag: module

Creating a new directory in /dev using udev rule

This is the code snippet responsible for creating the device: My udev rule is the following: From my understanding, this rule should match against the device name given by the kernel module (synchmess) and create the /dev subdirectory “synch”. However, the synchmess device shows under /dev with th…

Problem running “Hello World” linux module

I’m trying to compile and run a “Hello World” module from the book “Linux Device Drivers” the program ~/ldd3/hello.c I’m trying to compile is: And the Makefile is: When I run make, the compilation seems ok: But when I run : the “Hello World” message doesnt get p…

sys/types.h: No such file or directory

I am trying to compile module but get this error. Here is my module file headers And my Makefile I have tried to search for this file Here are results I tried to set it as #include “/usr/include/sys/types.h” but got following error I am using Kali Linux(Debian) AMD64 platform What is wrong ? Thank…

What’s the difference between insmod and modprobe?

I know insmod and modprobe are used to insert module into the kernel. But, what’s the difference between them? And, why is it dangerous to insert modules with force option in modprobe? Answer modprobe is the intelligent version of insmod. insmod simply adds a module where modprobe looks for any dependen…