Delayed Linux kernel panic when change the PFN in a PTE
I am running a kernel module, and i hit a kernel panic after a while when the module is unloaded. The kernel module does several things. 1. virt_addr1 = kmalloc(4096); 2. virt_addr2 = kmalloc(4096); 3....
View ArticleHow does Linux kernel discover PCI devices?
On the driver side, pci_register_driver() is called when a driver module is loaded, or at boot time if the module is built-in. (Whenever a device/driver is added, driver/device list is looped to find a...
View ArticleWhere can I find system call source code?
In Linux where can I find the source code for all system calls given that I have the source tree? Also if I were to want to look up the source code and assembly for a particular system call is there...
View ArticleHow to correctly extract a string from a user space pointer in kernel space?
I wrote a hook for the execve system call and in the beginning when I wrote it to print "hi", each time that a file is executed. It worked fine, but when I tried to print the filename that is passed to...
View ArticleUnusually slow TCP-connection in Linux
I wrote user-mode client-server c application based on Berkeley sockets that interact over some private network. The situation is definitely strange. Occasionally the connection becomes very slow under...
View ArticlePowerPC is unable to write/read on PCI MMIO space (Unrecoverable Machine Check)
I am having an important trouble while communicating with my PCI Endpoint devices MMIO. I plugged EP devices on an embedded board has PowerPC e5500 processor with kernel version 4.19.I have a FPGA...
View ArticleDo kernel *.S files use x64 assembly or for 32 bits?
In this question: GCC-Assemby Error: Relocation R_X86_64_32S against '.data', is a example of 'hello world` in x64. I came on this, because I was finding a good GAS asm book with for x64 architecture...
View ArticleLocking in kernel space
I am trying to understand how rw lock works in kernel space. I have a code that will add items on the list in the workqueue (will be done by multiple kworkers). Will the rw lock in kernel code ensure...
View ArticleError: :file `/boot/grub/i386-pc/normal.mod not found and ls shows...
enter image description hereHey I have a serious problem.. I can't boot. My laptop.. Help me. Ok.
View ArticleNFS mounting while booting Linux kernel on BeagleBone
I am trying to mount NFS while booting my beaglebone board. I use ethernet over usb on board. I have done this steps:Setup uboot settings:=> env default -f -a => setenv ipaddr 192.168.0.100 =>...
View ArticleLinux kernel NULL-pointer dereference in memset from kzalloc
Quite by chance stumbled upon some code in kernel jungles and was a bit confused. There are two implementations of kzalloc(): in tools/virtio/linux/kernel.h and the main one in linux/slab.h. Obviously,...
View ArticleManually building a Kernel source from Yocto build
I have a Yocto build for i.mx6 and I want to modify its Kernel. I figured that if I copy Kernel source outside the Yocto project and make my modifications without dealing with patches, I can speed...
View ArticleHow to fix: fatal error: openssl/opensslv.h: No such file or directory in...
I have RedHat Enterprise Linux Server 7, and I downloaded the linux kernel version 4.12.10 which I am trying to compile but when I execute the following command:make modules I get the following error:...
View ArticleNetfilter in Linux Kernel is not getting packets in espresso bin (armada...
I have written a simple Kernel Module that monitors network traffic in a bridge mode. This module works on a desktop machine with two ethernet cards. Now I am trying to test it on a device called...
View ArticleHow does Linux kernel set PCI BARs so that there is no address conflict?
As far as I understand, (which could very well be wrong,) each PCI device knows how much(size) iomem/ioport address space it wants to claim, but it does not know where(offset). Only the BIOS or OS can...
View ArticleKNEM cookie and declared region
First question is PROT_WRITE and PROT_READ i wasn't able to find anywhere and it's giving me a hard time compiling. I replaced with 0 and 1 but it doesn't seem to work. Second, "rejected (unexisting...
View ArticleUsing available bytes in Linux Kernel's struct page
I am looking at the definition of struct page in the file linux/mm_types.h. My question is in regards to the comment at the top of the definition: struct page { unsigned long flags; /* Atomic flags,...
View Articlewhat is use of common abi in system call table
I have added a simple system call which prints hello world using printk. For this, I added the below line to syscall_64.tbl434 common hello __x64_sys_hello Wrote a simple application, which calls the...
View ArticleI NEED HELP FOR UBUNTU [closed]
I have Ubuntu 18.04 and one day when I power on my computer appear a notice This one:/init: conf/conf.d/splash: FRAMEBUFFER not found And this one/dev/sda3: clean random numbers files, Random numbers...
View Articleasmlinkage defined to nothing in linux code
I was looking into asmlinkage tag.From https://kernelnewbies.org/FAQ/asmlinkageThis is a #define for some gcc magic that tells the compiler that the function should not expect to find any of its...
View Article