2,306 questions
0
votes
0
answers
38
views
Why is the printk Function Not Visible in /proc/kallsyms on WSL2, But _printk Is Present?
I'm working with WSL2 on Windows, running Ubuntu (and I've tried Arch as well), and I'm encountering some odd behavior with the Linux kernel symbols, specifically around the printk function. It feels ...
1
vote
0
answers
26
views
Raspberry Pi 5 PMUs return 0 when configured manually from EL1
I am working on a Raspberry Pi 5 (aarch64).
uname -a:
Linux rpi5 6.8.0-1036-raspi #40-Ubuntu SMP PREEMPT_DYNAMIC Mon Aug 18 09:50:42 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
I load a kernel module I ...
1
vote
0
answers
55
views
Kernel module fails to compile with 'undefined symbol: fib_get_table' despite function being present
I'm writing a Linux kernel module that prints the routing tables using dmesg. To do this, I'm trying to use the fib_get_table function to access FIB (Forwarding Information Base) tables.
Here’s a ...
0
votes
1
answer
130
views
A test app calling WinAPI ReadFile to a device driver always returns error code 87 (The parameter is incorrect)
Intro
I have this solution.
MNWE - (Minimum Non-Working Example)
ChatGPT gave me the following test app:
#include <windows.h>
#include <stdio.h>
#define DEVICE_PATH "\\\\.\\...
0
votes
1
answer
55
views
yocto on target linux kernel module compiling - Assembler problems
I have a yocto image for an ARM target. I am building kernel modules on the ARM target and have found an odd problem. Can anyone suggest a solution?
On the target I have run "make scripts ...
3
votes
2
answers
220
views
How to compile Linux Kernel module from several files?
I am having an issue with my module compilation written in C for Kernel and I even can't find documentation which would be helpful.
My issue looks like following. There are several files written in C ...
0
votes
0
answers
123
views
Can't open mmc as block device when driver is on built-in
I have a module who open mmc blockdevice, inspired of block2mtd.c driver on linux 5.1.
It works successfully when my driver is as module and "modprobe" after kernel started.
But it fail when ...
1
vote
1
answer
252
views
How can I update `devm_ioremap_nocache` based kernel module
I am trying to understand this linux DMA driver
I am compiling it for this kernel
On compilation, I am getting the error:
drivers/dma/msgdma/msgdma.c:342:25: error: implicit declaration of function ‘...
1
vote
0
answers
112
views
Issues cross-compiling kernel modules for an unknown embedded linux kernel
I've been working on learning cross-compilation for embedded linux, with the eventual end goal being to compile an RTL8188 Wifi USB dongle kernel module for an old embedded linux device that doesn't ...
1
vote
0
answers
61
views
disabling HW-prefetcher on an android Pixel 8
I am writing a kernel module which makes some low level experiments, and I've noticed that the HW prefetcher is intrupting them. I want to disable it while the experiemnts run.
I am running on Pixel 8 ...
0
votes
0
answers
121
views
How to fix fatal error "sys/socket.h: No such file or directory" mean as compiling ethernet driver?
I have a self-build kernel 6.6.27 from kernel source tree on ubuntu 20 04 When I compile the vendor-provided driver source, I got the error message as below,
Check old driver and unload it.
Build the ...
2
votes
1
answer
222
views
dma_alloc_coherent() memory remap to userspace via mmap
I'm working on a Linux kernel driver that allocates memory with dma_alloc_coherent() and maps it to userspace using mmap.
This works perfectly on kernel 4.18 (tested on 4.18.0-553.47.1.el8_10.x86_64), ...
1
vote
0
answers
83
views
kernel panic when calling user_path_at with path from open syscall
I am programing my own rootkit (for learning kernel programming). I use kprobes to hijack open syscall so it works on newest kernels. I tested the hooking and it works fine.
I want to get the real ...
0
votes
0
answers
112
views
Kernel module compilation error: Undefined references to __asan_register_globals and __asan_unregister_globals
I am trying to build "Hello, World" kernel module on Ubuntu 22.04 with Linux Kernel 6.1.25. However, when I run make, I encounter the following errors related to AddressSanitizer (ASan):
...
1
vote
1
answer
590
views
How to compile a custom kernel and have the headers and sources be installed in the correct place? [closed]
So, I have configured a kernel, and installed it by using make install and make module_install
Now, I want to compile out-of-tree kernel modules but obviously the linux-header-$(uname -r) package ...