Linux paging: How does linux fold Page Upper Directory and Page Middle...
I'm reading the book "Understanding the Linux Kernel" and I'm wondering how Linux folds the Page Upper Directory or Page Middle directory in a 3- or 2-level paging system.Based on my...
View ArticleAttempting to lock a spinlock in the down function results in freezing
I am attempting to implement my own version of a semaphore into a linux vm and am running into a crash when I attempt to lock a spinlock inside the down function. Using GDB I found that the down is...
View ArticleKernel panic not syncing attempted to kill init exit code 0x0000000b
I am trying to debug telnetd on a Site Router by writing log to a log file. After adding some debug log to telnetd.c in busybox and load new firmware, i got the error like above. Can anyone here tell...
View ArticleDo system call tables in Linux change over time?
Specifically, for x86 64-bit architecture, will the syscall table ever change? For instance, could there be additions of new syscalls or relocations of certain syscalls? I am fairly new to the concept...
View ArticleDoes SMAP/SMEP block allocation in userland (kmalloc)?
I am trying to exploit a heap overflow in Linux kernel with all the protections enable i.e. SMAP and SMEP. What I understand is that SMEP doesn't allow me to execute userland code and SMAP doesn't...
View ArticleHow to defer the probe using sysfs availability?
I have two drivers phy and ethernet. I want to defer the probing of ethernetuntil and unless the phy driver has created the syslink -Phy driver -sysfs_create_group -...
View ArticleHow to immediately cancel a work item of a workqueue in a Linux kernel module?
Kernel module code:#include <linux/delay.h>#include <linux/kernel.h>#include <linux/module.h>#include <linux/workqueue.h>MODULE_LICENSE("GPL");static struct workqueue_struct...
View ArticleLinux Kernel module - Probe defer leads to kernel warnings and trace errors?
For certain reasons, I am getting these kernel errors and I am trying to resolve it. However, I don't know the root cause. For sure, my driver retursn - defer probe so that kernel can try probe later....
View ArticleIn arm64 assembly, what does "adrp x0, idmap_pg_dir;" instruction mean?
A question on arm64 assembly language.For example in linux 5.9.15 source code, in arch/arm64/kernel/vmlinux.lds.S (linker script), there is a line idmap_pg_dir = .;. so idmap_pg_dir is an address. Now,...
View ArticleHow to understand "/proc/[pid]/stack"?
According to proc manual: /proc/[pid]/stack (since Linux 2.6.29) This file provides a symbolic trace of the function calls in this process's kernel stack. This file is provided only if the kernel was...
View ArticleCentOS 6.5 kernel panic when running a perf process
I'm working on making continuous profiling on running process, so I set a crontab on server. It periodically runs a python script which exec perf subprocess collecting perf data from a daemon process...
View Articlecopy_to_user() keeps printing message infinitely
I am learning "Linux device drivers" and I created a character device named char_device. When I try to read the data from the device it keeps printing the message to terminal infinitely crashing the...
View ArticleLINUX Parent Process ID (PPID) same for all his children? And writing to RAM...
I have a two small question about LINUX/UNIXFirst question about the PPID parent process ID... The question is:Processes with the same Parent Process ID (PPID) are necessarily created by the same...
View ArticleLinux Huge pages memory usage calculation
I read the article about Linux Huge pages technology and misunderstood some important detail.Here is the phrase:For example, if you use HugePages with 64-bit hardware, and you wantto map 256 MB of...
View ArticleCan't change max_locks_per_transaction in docker postgres container
i am using docker image kartoza/postgis:9.6-2.4 to perform django tests. The main problem is that it complains out of shared memory and in logs it suggests to increase...
View ArticleWhy does the Linux kernel not stop at the first handler for a shared IRQ that...
I'm sure there's a good reason for this, but I can't see what it is. Inside __handle_irq_event_percpu the kernel loops over all the handlers registered for a particular IRQ line and calls it. What I...
View ArticleMakefile error when trying to build core-image-minimal with custom DTB
I'm new to the Yocto Project and I'm trying to build a simple core-image-minimal image for my custom board based on i.MX6QP/Q/DL SABRE Automotive. Right now I'm only working with the meta-freescale...
View ArticleUbuntu crash: BUG: unable to handle kernel NULL pointer dereference [closed]
Since sunday my ubuntu server has crashed two times.For the second one I found this error messageNov 30 22:55:30 mail kernel: BUG: unable to handle kernel NULL pointer dereferenceNov 30 22:55:30 mail...
View ArticleWhy there is no atomic_add_and_test?
I read Linux Device Drivers v3 and I'm now at atomic variables, there is operations that increment, decrement or subtract the value of the atomic variable, but there isn't an operation that add and...
View ArticleRT-Linux skeleton module
I would like to create a simple linux module for rt-linux.I am using am5749 (custom board) ti-processor-sdk-linux-rt-am57xx-evm-06.03.00.106.So...I'm trying to compile many examples.It doesn't work...
View Article