17,836 questions
2
votes
0
answers
65
views
Why does /proc/iomem show RAM is split up across physical address space? [closed]
When looking at explanations of physical memory address spaces, I always see either RAM/main memory being 1:1 with physical address space, or with MMIO, I see that physical address spaces are split ...
Advice
0
votes
1
replies
24
views
what maximum version of alsa-lib can be use with Linux kernel version 5.16.18?
I am looking for the maximum version of alsa-lib that I can use with LINUX kernel version 5.16.18.
On searching for the release note for Linux version 5.16.18 https://lwn.net/Articles/889437/, I didn'...
0
votes
0
answers
55
views
Block corruption error on dm-verity on Yocto Linux [closed]
We are working with NXP S32G2 processor.
On Linux side, we have been encountering the block corruption issue as metadata block 152577 is corrupted.
Ideally, we have 152576 blocks in dmverity.env and ...
-2
votes
1
answer
129
views
move_pages() on Linux increadibly slow [closed]
I move several gigabytes worth of 4k pages on a Linux host from one numa node to another node using move_pages(). It takes many minutes and amlost no CPU load to do so.
I can't figure out why.
Any ...
Advice
0
votes
2
replies
38
views
What is the best way to hack linux kernel source and learn by doing?
I am new to both Linux kernel engineering and mm. I am interested in mm subsystem.
One person on irc channel told me to read the page fault handler code (both x86 architecture specific and the generic ...
5
votes
1
answer
148
views
Why is atomicity needed for the variable counter in this Linux kernel module which only runs code from its init and exit functions?
I'm reading this example Linux kernel module from a tutorial, and I do not understand (in this line) why the variable count in struct task_info needs to be atomic_t. The module has a module_init ...
0
votes
1
answer
29
views
inconsistent verifier behavior for fentry and kprobe ctx
I am trying to understand why kprobe and fentry eBPF programs that I think should be doing the same thing, are not.
The following two programs compile and load just fine. They are kprobe programs.
...
Advice
0
votes
0
replies
15
views
Can `set_cpus_allowed_ptr` be called BEFORE starting a kernel thread?
Can the function set_cpus_allowed_ptr can be called on a kthread right after kthread_create_on_node'ing it, but before waking it up via wake_up_process?
Context: trying to solve this problem. Long ...
-1
votes
1
answer
89
views
In aarch32 mode, will the values of x15 - x30 and the high 32 bits of x0 - x14 affect the program?
Recently, I've been developing an aarch64 OS kernel and need to support aarch32 user-space programs. I'm studying the Linux implementation, and the following are confusing me:
Linux saves/restores ...
1
vote
1
answer
132
views
Can LD_PRELOAD replace a function resolved via dlopen()/dlsym()?
I have a scenario where:
A program dynamically loads liba.so using dlopen(), then resolves and calls the function func1() from it via dlsym().
I have created libb.so which redefines the same-named ...
0
votes
2
answers
70
views
How to function trace a custom Linux kernel module with trace-cmd?
I've written a kernel module, let's call it my_mod.ko. Now I want to analyse the performance of my module.
For this I'd like to know the time each function call takes. From this article I gather, ...
2
votes
1
answer
86
views
Handshake fails with RST after destination address modification of TCP packets in Netfilter hooks
I am implementing a destination NAT-like behavior by hooking into NF_INET_PRE_ROUTING and NF_INET_LOCAL_OUT to modify the destination IP address and recalculate the checksums.
nf_tracer_handler(void *...
3
votes
2
answers
164
views
Question about retry logic in usb-skeleton.c skel_read()
I'm a computer science undergraduate student studying Linux kernel USB device drivers.
While analyzing the skel_read() function in usb-skeleton.c, I noticed what seems like inconsistent retry logic. I'...
Advice
0
votes
0
replies
59
views
Show a splash screen during or just after kernel boot (before Weston starts)
I want to: Show a splash screen during or just after kernel boot (before Weston starts). Possibly write raw image data directly to framebuffer or use fbv, psplash, or something similar. Questions: Is ...
Best practices
0
votes
3
replies
150
views
Can Linux kernel software mechanisms track the sequence of accessed memory pages, or is hardware support required?
I want to generate a memory access trace in Linux where every fixed number of memory accesses (e.g., every 32 accesses) are grouped and recorded as one batch. Is it possible to implement this kind of “...