Top "Kernel-module" questions

A kernel module is a run-time loadable object file that is loaded into operating system kernel to add functionality to a running kernel.

Using ioctl communication between Kernel mode and user mode

I want to communicate with my kernel module using ioctl. I have written two c program one for kernel module …

ubuntu-10.04 kernel-module ioctl
Convert source IP address from struct iphdr* to string equivalent using Linux netfilter

I want to convert the source & destination IP addresses from a packet captured using netfilter to char *. In my …

c linux kernel kernel-module netfilter
Not able to remove a loadable kernel module

I'm writing a loadable kernel module and trying to test it. After inserting it I was trying to remove it …

c kernel-module insmod
how to determine if a Linux kernel module is leaking memory

For testing the behavior of the kernel when it leaks memory, I am writing a kernel module that continuously allocates …

linux-kernel memory-management kernel-module
Linux Kernel Modules: When to use try_module_get / module_put

I was reading the LKMPG ( See Section 4.1.4. Unregistering A Device ) and it wasn't clear to me when to use the …

linux-kernel linux-device-driver kernel-module
How can I get a filename from a file descriptor inside a kernel module?

I need to get the name of a file from a given file descriptor, inside a small linux kernel module …

c linux linux-kernel kernel-module
How to read/write from an Flash connected through SPI in an embedded Linux (ARM)?

I am using Yocto and meta-atmel to build an embedded Linux(4.4.19). On my board is an Flash which is connected …

linux linux-kernel embedded-linux kernel-module flash-memory
Difference between printk and pr_info

What's the exact difference between printk and pr_info functions ? And under what conditions, should I choose one over the …

c linux-kernel kernel-module printk
Opening a device file fails due to No such device or address

I am trying to create a character device driver (kernel module). The modue gets loaded, creates the character device as …

c linux kernel-module chardev
Getting list of network devices inside the Linux kernel

I've been looking through net/core/dev.c and other files to try to find out how to get the …

linux network-programming linux-kernel kernel-module