linux-kernel: regmap: random page fault due to huge i2c access
Lately, I was getting random page fault after switching to regmap from traditional I²C access, I suspect it is due to the huge register access, since another regmap (idtsmu_sabre_range_cfg) with...
View ArticleIncluding external assembly functions from a .asm file into a .h C header file
I have a C header file cpu_checks.h that declares an extern function, which is implemented in an assembly file cpu.asm.cpu_checks.h:#ifndef CPU_CHECKS_H#define CPU_CHECKS_H extern int...
View ArticleHow to compile the Linux kernel to be as small as possible?
I'm working on a side project which requires me to configure and compile a tiny Linux System based on Ubuntu. The result should be a tiny OS with the following features:A BootloaderA KernelA ProcessA...
View ArticleSwitch between generic and xanmod kernel
I'm using ubuntu 20.04. I have recently installed xanmod kernel, however, I wanted to change back to generic kernel. How can I do that?The output of dpkg -l | grep linux-image:rc...
View ArticleGet bind mount's source with kernel API
Suppose the filesystem on sda1 looks like:/ fedora/ ubuntu/The filesystem on sda2 looks like:/ boot/ bin/ dev/ etc/ home/ owner/ lib/ mnt/ boot/ opt/ proc/ root/ run/ sbin/ srv/ sys/ tmp/ usr/ var/...
View ArticleWhere is kmalloc()-contiguous memory allocation required other than DMA?
What are the cases where a kmalloc() is required other than the DMA memory allocation. Where else it could be used (the other places where in a contiguous memory allocation is required)? To be precise...
View ArticleWhat's real world usage of post handler in the kprobe
Kprobe has two main handlers, [post|pre] handler. AFAIK, the pre handler can be used to observing arguments passed to the function. But regarding to another one, I have no idea what's the use of it.Is...
View ArticleHow to include specified function in the flame graph?
There is no function name that I want to see in the flame graph, but I'm sure this function works.How can I do to show the function name what I want to see displayed in the flame graph?
View ArticleHow can I see a page-table maintained by each process in Virtual Memory - Linux?
In the virtual memory concept- each process maintains their own page table. This page table maps the virtual address to the kernel virtual address. This kernel virtual address translates the address to...
View ArticleCan a Linux process/thread terminate without pass through do_exit()?
To verify the behavior of a third party binary distributed software I'd like to use, I'm implementing a kernel module whose objective is to keep track of each child this software produces and...
View Articlelinux loadable kernel module found in config file but not present at runtime
This https://github.com/LineageOS/android_kernel_samsung_universal9810/blob/30d29cfa762a6caad24fa18514169bbf922e9f4e/arch/arm64/configs/exynos9810-crownlte_defconfig#L3638 is the kernel normally...
View Articleiptables v1.4.14: can't initialize iptables table `nat': Table does not exist...
I'm trying to set iptable rules, and I got following error message when I use iptable :iptables v1.4.14: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)Perhaps...
View ArticleWhy Linux kernel never implemented a per data object RCU mechanism?
The core RCU APIs in the Linux kernel applies to all clients in the kernel, which means any reader (even if they are accessing totally unrelated data structures) accessing rcu-backed data will be...
View ArticleHow to compile and link arch/x86/boot/header.S and arch/x86/boot/main.c in...
I am trying to write a simple hello world kernel that is bootable with GRUB2. To that end I have isolated the arch/x86/boot/header.S and arch/x86/boot/main.c files from the linux kernel source as a...
View Articlelinux cdc_ecm driver vs rndis driver
How is linux cdc_ecm driver related to rndis protocol? Is cdc_ecm based on rndis specification from microsoft in any way?From this wiki page https://en.wikipedia.org/wiki/RNDISThe USB Implementers...
View ArticleHow can I modify the config file (/proc/config.gz) in linux (Android)?
EDITED: I found that We cannot edit this file, We have to recompile the kernelI am installing docker on Android. there are some configurations related to cgroup which are not enabled. I could find it...
View Articlemonitor /sys aka sysfs
I tried to monitor battery capacity from go program using inotify and was able to detect when I was cating it, but not when it changed 'naturally'. So I read some more documentation and found this in...
View ArticleComputer hangs so even reset button doesn't work. What are the possible...
I have several identical, modern (core i7), computers, running Ubuntu, that randomly hang under conditions of heavy compute, network, and USB usage. Enabling all the panic and NMI kernel flags, in...
View ArticleHow to simulate a specific codepath when debugging a large project with huge...
i 've been learning vulnerability research aka bug hunting in open source project so i have the source code on hand.My main problems are two, when i get suspicion that this part of code migt be...
View Articlefault handler (kernel) goes back to the thread does the process terminate
I have a question about internal part of the kernel, was not able to find much anymore.If the fault handler (kernel) goes back to the thread that caused it, would the thread's process terminate? Or...
View Article