splice(2) returns "Invalid argument" when reading from ftrace raw files
I wanted to try splice syscall, which trace-cmd uses to zero copy raw files of off ftrace.Here is the partial list of ftrace raw files splice fails to...
View ArticleHow to register for an "uevent" from a user application in Linux?
I have written battery driver and that driver sends an uevent when a power supply is changed, i.e. from AC to batteryWhen I run udevadm monitor I see an KERNEL and UDEVCHANGE events from power_supply...
View ArticleE: Some index files failed to download. They have been ignored, or old ones...
I'm using Ubuntu 18.04.5 LTS. I have tried to modify the software and updates failed. So, when I try to make update withsudo apt-get update I got this error:But it give this error -Get:17...
View ArticleIs it possible to make kernel resolve symbols in a stack trace?
I have a program that crashes from time to time with the following message in syslog. The program does not have SIGSEGV handler implemented, so the stack trace below is generated by the kernel.What...
View ArticleHow to set udp buffer size for a docker container?
I would like to set the UDP buffer size for a docker container. Though, the UDP buffer size is a setting related to the kernel and it corresponds to that of the host, I see that, I don't see my host...
View ArticleHow to access containing structure from a member in C?
I'm working with a few kernel modules (4.19.97) and I allocate struct my_sock like the following.struct my_target { union thingA { ... } a; struct thingB *b;};struct my_sock { struct sock sk; // ......
View ArticleProcess P1 fork process P2. I reverse-mapped a physical address shared by P1...
This is my code for traversing anon_vmavoid get_virt_file(struct page *page){ printk(KERN_INFO "this is file mapped page"); struct address_space *mapping = __page_rmapping(page); struct rb_root *root =...
View ArticleWhat the documentation of Linux Programmer's Manual is documenting?
I have worked with the manual page of the socket() in my Linux system and I was wondering what the functions it is documenting are belonged to.For example, the function int socket(int domain, int type,...
View ArticleUbuntu does not reboot into newly installed kernel version [closed]
After updating my Ubuntu installation from 16.04 to 20.04 I wanted to update the kernel to the most recent version. Therefore, I installed the most recent kernel versions, both from apt (5.4.0.42.46)...
View ArticleReading physical memory with /dev/mem
I am trying to figure out how to directly read any location in physical memory on a Power9 processor using /dev/mem. The following is the code that I have used to that end.FILE* fp;int _fdmem;int *map...
View ArticleGranting permissions of a directory to a specific group in Linux [closed]
I have a directory called home. It has two groups assigned to it: root and students. I want to give rwx permissions to root and limit the permissions of students to r_x. How can I achieve that?
View ArticleHow to get the skb fields info while receiving packets and while sending...
I want to list some fields of skb packets while entering into my router and same fields while going out of my router. I have filled my structure of link_list when packet is received in...
View ArticleCalling printk in a simple IRQ handler crashes the kernel
I'm new to kernel programming and I couldn't find enough information to know why this happens. Basically I'm trying to replace the page fault handler in the kernel's IDT with something simple that...
View ArticleHow does SIGSTOP work in Linux kernel?
I am wondering how SIGSTOP works inside the Linux Kernel. How is it handled? And how the kernel stops running when it is handled?I am familiar with the kernel code base. So, if you can reference kernel...
View ArticleWhy message queues are in Kernel address space but not the shared memory
I have been asked in an interview why the message queues are in kernel address space and same has been suggested in following link.http://stork.sourceforge.net/thesis/node49.htmlWhich says "Message...
View ArticleWhat does write_cr0(read_cr0() | 0x10000) do?
I searched the web a lot but didn't find a short explanation about what write_cr0(read_cr0() | 0x10000) really do. It is related to the Linux kernel and I curios about developing LKM's. I want to know...
View ArticleDoes the force kill command (kill -9) in linux cleanup the dynamically...
I have a C++ application to be run on Oracle Linux OS.Consider, I have created few objects with new operator. Though I have used delete operator to deallocate it, but the force kill command would not...
View ArticleEnabling the Remote Processor Messaging (rpmsg) framework for android 10?
I am working with Android OS and FreeRTOS and require the use of the Remote Processor Messaging(rpmsg) framework that is available in Linux. I want to enable this framework on the Android OS on the...
View ArticleIf I want to write my own process scheduling algorithm and apply it in Linux,...
I want to write my own process scheduling algorithm but I don't know how to start
View ArticleLinuxPPS Setup/Integration
I am trying to get my RHEL Linux machine to ingest a PPS signal. I know I can specify a hardware clock with chrony, but I am confused on how I define the directory (?).From looking online it appears I...
View Article