A kernel module is a run-time loadable object file that is loaded into operating system kernel to add functionality to a running kernel. Examples include device drivers and other kernel items.
Questions tagged [kernel-module]
2228 questions
6
votes
1 answer
Is it possible to communicate between two linux kernel module via netlink?
As all know, netlink it's user/kernel space communication mechanism.
I want to communicate from my kernel module to an another. Another kernel module already has the netlink interface.
Is it possible to make connection from kernel module to netlink,…

AlexeyPerevalov
- 191
- 3
- 6
6
votes
3 answers
How to autoload a kernel module in Gentoo Linux?
I want to autoload some kernel modules when it's started. I've read the manual book, but can't help. Now the modules that I want to autoload are vboxdrv vboxnetadp vboxpci vboxnetflt, The modules directory is /lib/modules/3.0.6-gentoo/, the config…

Fei Xue
- 1,995
- 5
- 19
- 29
6
votes
2 answers
Using sk_buff to add an Ethernet frame header
I have a kernel module that captures outgoing Internet traffic(Netfilter hook: LOCAL_OUT)
At this hook, there's still no Ethernet header.
I built the Ethernet header and it's ready to use, but how can I attach it to the skb so that I can send the…

Fingolfin
- 5,363
- 6
- 45
- 66
6
votes
3 answers
how can I get maximum bandwidth of an interface in linux C?
Let's say I have a machine with 3 NICs; wifi, eth, and 3G. I'm trying to get the ESTIMATED speed (or bandwidth) at which a link CAN transmit at a given time for each of these interfaces and determine which one is the fastest. Again at a given time.…

Varda Elentári
- 2,242
- 6
- 35
- 55
5
votes
4 answers
open() returns with "No such device" error, but there is such a device (linux)
I'm trying to use a somewhat old DAQ, and had to jump through a few hoops to get an old (circa 2004) device driver for it to compile (DTI-DT340 Linux-DAQ-PCI).
I've gotten to the point where it compiles, I can load the kernel module, it finds the…

Paul Ivanov
- 1,984
- 1
- 16
- 14
5
votes
2 answers
kernel driver external modules not building completely
I'm adding an external driver module to an android Gingerbread kernel (works similar to Linux). I've done it before and it worked but I have a problem this time. I follow the recipe found in O'Reilly "Linux Device Drivers 3rd edition" which is:
in…

Sylvain Huard
- 1,378
- 6
- 18
- 29
5
votes
1 answer
Communication between kernel threads in a linux kernel module
I'm just beginning to learn the tricks of making a kernel module on linux kernel 2.6. What I'm looking to do is have 3 kernel threads, called the slaves, that need to send data to a 4th kernel thread, called master, and receive their respective…

Ram
- 1,161
- 1
- 11
- 34
5
votes
2 answers
Unable to add a simple kernel-module to Yocto image
Goal
I want to add a touchscreen driver available in the linux kernel source tree to my Yocto image (The link takes you to goodix.c). I basically need to add it as a kernel module.
Solution
I follow the Incorporating Out-of-Tree Modules section of…

Micrified
- 3,338
- 4
- 33
- 59
5
votes
2 answers
dump mapped buffer with dd
Into /proc/PID/maps I can see memory that some buffer mapped to kernel module:
44a00000-44b00000 rwxs 00000000 00:01 XXXX /dev/my_module
I know that it's logical address , and I want to dump this memory with dd?
dd need to get physical memory…

MicrosoctCprog
- 460
- 1
- 3
- 23
5
votes
2 answers
Android 10: Update kernel modules
Background: I am working with a Pixel 4, build QQ2A.200501.001.B2, which is Android 10. When I build the kernel from the official sources and flash it, the touchscreen, wlan and other features do not work. I tracked this down to the fact that the…

onetyone
- 457
- 4
- 15
5
votes
1 answer
module debugging through KGDB
I want to debug my kernel module. For that I am trying to put a breakpoint at do_one_initcall in kernel/module.c just before my init_module gets called but it's displaying
Cannot access memory at address
0x802010a0
Below is the Makefile which I…

cp5662
- 51
- 1
- 3
5
votes
3 answers
Making/Building a kernel module inside a docker container
I currently have my host system running Mac OS with docker. I have my Mac OS host system spawning a docker container.
The spawned docker container is currently running ubuntu:19.10
I am trying to build a kernel module inside the docker container…

jremi
- 2,879
- 3
- 26
- 33
5
votes
1 answer
Allocating huge pages in kernel modules
I'm looking for a way to allocate huge pages (2M or 1G) in a kernel module (I'm using kernel version 4.15.0).
In user space, I can mount the hugetlbfs file system, and then allocate huge pages using mmap (see, e.g.,…

andreas
- 143
- 4
5
votes
1 answer
Memory Isolation in new Linux Kernels, or what?
This my module perfectly hijacks user's console: https://pastebin.com/99YJFnaq
And it was Linux kernel 4.12, Kali 2018.1.
Now, I've installed the latest version of Kali - 2019.1. It uses kernel 4.19:
Linux kali 4.19.0-kali1-amd64 #1 SMP Debian…

lfshyrtj
- 77
- 5
5
votes
4 answers
Android LowMemoryKiller Failing to Kill Webviews
For quite some time now, I've been trying to debug major bursts of lag/stuttering on my device, when playing heavy games. After analyzing my logcat a lot, I feel I've identified what is causing the spikes of unbearable lag. The following error shows…

Koolstr
- 464
- 1
- 10
- 20