17,849 questions
0
votes
0
answers
24
views
How to build a Yocto Linux image for i.MX8QXP MEK when NXP does not provide a BSP?
I am trying to build a Linux image for the NXP i.MX 8QuadXPlus (i.MX8QXP) Multisensory Enablement Kit (MEK). NXP’s official BSP release (L6.x / L5.x / L5.15.x) does not provide a pre-configured ...
2
votes
0
answers
61
views
In-Order Delivery of UIO Interrupts for Userspace Driver
I have multiple UIO interrupts defined. I am using Linux 6.12 without the realtime config.
My userspace driver is using poll in a loop to watch these interrupts as described here.
Sometimes, due to ...
0
votes
0
answers
21
views
Snap fails on Debian 13 Trixie: “system does not fully support snapd: squashfs mount returned no err but canary file cannot be read” [closed]
I’m trying to get Snap working on Debian 13 (Trixie), but whenever I try to install any Snap package, I get the following error:
error: system does not fully support snapd: squashfs mount returned no ...
Advice
0
votes
3
replies
61
views
Enforce probe order for device tree overlay fragments
I am building a dto for a display using an Ilitek 9806e controller and a Goodix Gt911 touch controller.
These two components share a single reset line, so this reset line should only be asserted once ...
-2
votes
0
answers
66
views
How to properly implement reference counting in Linux kernel modules to prevent use-after-free vulnerabilities? [closed]
I'm developing a custom Linux kernel module for managing device resources, and I need to implement proper reference counting to prevent use-after-free (UAF) vulnerabilities.
My module maintains ...
-4
votes
0
answers
110
views
Custom board based on i.MX soc: custom driver module crashes after Linux update
Introduction: I'm using a custom board based on an i.MX6q SoC that communicates with an FPGA on the EIM bus: this communication is managed via custom driver module. The DTACK signal and memory WDOG ...
0
votes
0
answers
85
views
U-boot loading kernel from FIT fail
I using u-boot v2017.09 for rk3566, i want to load kernel from FIT(kernel, dtb, ramdisk).
I hardcoded bootargs(boot_get_cmdline) in u-boot:
int boot_get_cmdline(struct lmb *lmb, ulong *cmd_start, ...
0
votes
2
answers
79
views
How to reliably map glibc dynamic symbols (e.g., open@glibc) to kernel syscalls (e.g., openat)?
I am trying to build a mapping between the dynamic symbols in ELF files (from glibc) and the actual kernel syscalls they invoke.
My environment is x86_64 Ubuntu 22.04.
What I've Tried
Parsing man 2 ...
0
votes
1
answer
47
views
Where Can I See the Mapping Flow Between .dynsym and Kernel System Calls?
I'm struggling to reconcile the difference between the symbols listed in my ELF file's dynamic symbol table (.dynsym) and the system calls observed via strace.
When I perform static analysis using ...
1
vote
1
answer
62
views
kretprobe executes the entry_handler function, but it doesn't execute the handler function
I'm interested in the arguments and the return value of the function __bread_gfp, so what i did was install an entry_handler for the arguments and a handler for the return value. Here's my code:
#...
1
vote
0
answers
42
views
TLS Handshake disappearing when modifying it with eBPF (TC egress)
I have two k8s pods that communicate using TLS. I am loading an eBPF TC code on the egress of the sender pod. This code adds 28 bytes to the optional space of the TCP headers after TCP options. If I ...
0
votes
1
answer
129
views
Manual strstr implementation in eBPF on kernel level
I am trying to implement a manual implementation of strstr in eBPF but cannot get past verifier.
Before starting, I know there is an existing bpf_strstr() implementation, but it's on 6.17+ linux ...
0
votes
0
answers
43
views
AXI DMA Linux Driver on ZynqMP
I have a ZynqMP board with 4GB of PS RAM and 2GB of PL RAM. I have to write stream data to PL RAM using the AXI DMA s2mm channel and transmit it through 1G Ethernet. I've done this in a bare metal ...
Best practices
0
votes
3
replies
60
views
Where arguments of the running program are visible in the kernel
I'm writing a kernel patch (you can see a project here) that, when any program is launched in the system, checks whether the program has the bitX attribute in its хattr. If it's missing or equal to 0, ...
0
votes
0
answers
175
views
Unable to run linux.pslist.PsList: Unsatisfied requirement plugins.PsList.kernel.layer_name / symbol_table_name on Android 15 dump
I'm unable to access the linux.pslist.PsList plugin (and others) in Volatility 3 Framework 2.27.0.
The plugin fails to resolve the kernel layer and symbol table, even though a Linux symbol file for ...
0
votes
0
answers
97
views
Fully release VFIO resources in DPDK
I am writing a C program that periodically loads/unloads a dynamic library. The dynamic library performs network operations using DPDK, and in my setup, it relies on the VFIO framework.
This is a ...
2
votes
1
answer
85
views
How does Linux Perf manage hardware counters when profiling a multithreaded process?
I am trying to understand how Linux Perf manages hardware counters when profiling a multithreaded process.
According to the documentation, the perf_event_open syscall can be used in two ways:
To ...
3
votes
1
answer
147
views
Making a custom build target with Bazel to specify custom kernel config flags
I've been doing some kernel development on the Google pixel 9a "tegu" platform (latest version on https://developers.google.com/android/drivers), where Google uses Bazel to compile the ...
1
vote
1
answer
78
views
What is the best way to detect busy CPU cores for blk-mq request steering in Linux kernel?
I am trying to implement request steering in Linux kernel’s blk-mq layer to distribute I/O requests across CPU cores based on load. My goal is to redirect requests from busy cores to less busy ones to ...
0
votes
1
answer
136
views
System call transition to system call table
When a system call is invoked by a user program, a software interrupt (trap) is raised, control first passes to the fixed location of the interrupt vector (IR) which contains the ISR associated with ...
0
votes
0
answers
53
views
Dynamic Core Management via Arm's PSCI on OdroidC4
I have been creating a basic core management tool which is able to dynamically turn CPU cores on and off using Arm's PSCI CPU_ON and CPU_OFF functions. This worked great on QEMU, however moving onto ...
2
votes
0
answers
318
views
bpftool missing from linux-tools-6.14.0-32-generic package on Ubuntu 24.04 LTS [closed]
I'm running Ubuntu 24.04 LTS with kernel 6.14.0-32-generic and trying to use bpftool for eBPF dev. After some struggling in setting up, I realized that the linux-tools-6.14.0-32-generic package is ...
0
votes
1
answer
102
views
Why can't successfully kmalloc pages in this case?
See the below logs, A critical kernel driver cannot apply for a large block of continuous memory and then panic:
[29001.362425] kworker/u12:4: page allocation failure: order:4, mode:0x40dc0(GFP_KERNEL|...
1
vote
2
answers
140
views
How to enable I2C GPIO fault Injector in Linux kernel
I am attempting to introduce bus errors on the I²C bus using the i2c-gpio fault injector already available under drivers/i2c/busses/. For my target platform (AST2600), I’ve enabled the following ...
0
votes
0
answers
67
views
Raspberry Pi Sense HAT joystick not probing in Yocto kernel despite DT entry and config enabled
I'm working in a Yocto environment and trying to enable the Raspberry Pi Sense HAT joystick. I've added the following device tree entry:
sensehat-joystick@46
compatible = "raspberry Pi, sense hat-...
1
vote
1
answer
88
views
futex_wait inside a signal handler
So I am trying to understand if I am missing anything about calling futex_wait inside a signal handler for a SIGSEGV access violation. Ostensibly, it is not on the list of async-signal-safe calls, ...
2
votes
0
answers
225
views
Building a kernel for pixel 9A tegu [closed]
In the android docs, it mentions that we can use bazel to build the .img file for the kenrel (which we can flash with fastboot). However, I don't seem to have the //common:kernel_aarch64_dist target ...
1
vote
0
answers
31
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
77
views
pr_info print inside __pollwake triggers kernel panic
I have the following code to track what process wake up which process in __pollwake
linux kernel 6.6.6x
/fs/select.c:
static int __pollwake(wait_queue_entry_t *wait, unsigned mode, int sync, void *...
1
vote
0
answers
119
views
Stable path to i2c device
I have a device driver that provides quite simple functionality that does not belong to any of the classes. The driver exposes one attribute through sysfs.
Currently I can get an access to my device ...
0
votes
1
answer
75
views
How to write userspace or kernel application that would allow me to generate a lot of asynchronous interrupts on x86_64 Linux?
I am studying a performance (progress guarantee?) problem of an x86 hypervisor software. The current hypothesis is like this. There is a high intensity of interrupt requests caused by concurrently ...
1
vote
0
answers
123
views
RISC-V a1 register assumptions after ecall execution
As explained here it's clear to me that user-space calling conventions don't apply when dealing with kernel-space system call execution, so basically no register is clobbered after an ecall ...
2
votes
0
answers
120
views
L1d Cache miss and L1d cache ref counts are way off as shown by perf stat
Wrote an eBPF code to count cache refs and miss of a target process. The program seems to work, albeit the counts dont match even closely to the perf stat output. I am assuming there is some issue ...
0
votes
1
answer
76
views
Using kfunc defined in a loadable module by BPF program
I would like to define my own custom kfunc (in a loadable linux kernel module) that I can then use in a bpf program. I think I'm 99% there, but I'm stuck on loading the bpf program with bpftool. What ...
2
votes
1
answer
81
views
ebpf helper func "bpf_probe_write_user" return error (-14)
I was attempting Experiment 2 specified on the site, which involves modifying the first parameter (the file path of the executed program) in the sys_enter_execvfunction. However, when I called ...
0
votes
2
answers
115
views
mkinitcpio ERROR: Hook 'luks_unlock' cannot be found
I am trying to build a full-disk encryption scheme in ArchLinux. I found that GRUB cannot pass header parameters, so I think I need to write a custom hook script to guide the LUKS header and key file.
...
0
votes
0
answers
73
views
Analyzing /console-ramoops-0 after Android kernel panic – Unable to identify root cause
I’m trying to debug a kernel panic on my custom rom Android device. I have access to /console-ramoops-0 , but I’m struggling to pinpoint the cause.
Linux version 4.19.111 (android-build@dev-android-...
0
votes
1
answer
47
views
Linux scheduler : what is struct sched_entity and why not store task_struct directly
In the Linux scheduler, each CPU has one struct rq, which contains sub-runqueues for each sched_class (CFS, RT, DL, idle).
For CFS, the runqueue stores a task’s sched_entity (p->se) instead of the ...
0
votes
0
answers
100
views
Why does the Linux kernel use initcalls instead of calling init functions directly?
I’m trying to understand the rationale behind the Linux kernel’s initcall mechanism.
My current understanding:
Kernel subsystems expose one-time initialization functions using macros like ...
1
vote
0
answers
57
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
0
answers
136
views
Build of custom linux kernel module for amd64 fails, the 686 version builds fine
I am building my linux drivers, the 686 version builds fine, the amd64 version fails. My last driver build for amd64 that worked was under kernel 6.6.x. However, the 6.15.x amd64 build is failing; I ...
1
vote
0
answers
146
views
Performance issue with Python, Mongo, Redis and pingpong threshold?
I faced the issue that my integration tests get 3x performance boost on Ubuntu 20.04 with Kernel 5.4 but on Ubuntu 22.04+ and all Linux kernels after 5.10.135 there is not such boost.
Integration ...
6
votes
2
answers
555
views
How to exclude a USB adapter vendor and product ID from a Linux HCI command [closed]
My CM749 UGREEN Bluetooth 5.4 adapter does not work on Linux kernel 6.15.7, since when the kernel sends Read_Local_Extended_Features to CM749, by the time the adapter finishes responding, the ...
6
votes
2
answers
419
views
What does it mean to "cancel" a command in the linux kernel and how can one do so?
Context
I bought a CM749 UGREEN Bluetooth 5.4 USB adapter for my Nixos machine. It is recognized by lsusb as ID 33fa:0010 USB2.0-BT, but is not detected by KDE/Plasma's bluetooth daemon.
I dug deeper ...
2
votes
1
answer
145
views
Are I²C child nodes instantiated as platform devices during of_platform_populate()?
I'm trying to understand how platform_devicesare instantiated from the Device Tree during early kernel boot.
I noticed that the function of_platform_default_populate_init() is called via ...
-2
votes
1
answer
208
views
Lack of alias in kernel module .ko file built with Yocto [closed]
I am trying to build a driver for my IP in an FPGA. I have:
static const struct of_device_id myip_of_match[] = {
{ .compatible = "xlnx,myip-controller-1.022", },
{},
};
...
1
vote
1
answer
70
views
Why must sched_class structures be tightly aligned in memory in the Linux kernel?
Each scheduling policy (like SCHED_NORMAL, SCHED_FIFO etc..) is implemented as a struct sched_class, and instances like fair_sched_class, rt_sched_class, dl_sched_class, etc., are defined using the ...
2
votes
1
answer
150
views
Linux: Low-level management of virtual memory - collaboration between processes
If I were to mmap() a very large file (for read-only access) pages would be read-in, by the kernel, after a page fault indicates that the page is not already cached in RAM. Pages will remain cached ...
0
votes
0
answers
96
views
fd is not pointing to valid bpf_map (BPF_PROG_LOAD syscall failed)
While testing my rust Aya xdp ebpf program i came across this error
Error: the BPF_PROG_LOAD syscall failed. Verifier output: fd 10 is not pointing to valid bpf_map
verification time 215 usec
stack ...
1
vote
1
answer
55
views
Failed to run netlink API in docker
Can anyone help me address the problem why Connection Refused happen when I run the program in docker container? If I set --net=host --privileged when running docker container, it works, otherwise ...