v4l2 kernel space debugging
Is there any default mechanism to enable debugging the v4l2 drivers.Basically I want to check something like dynamic debugging by setting in /d.Compile time flags in make file also fine.Currently, I...
View ArticleWhat do the parameters mean in scull's proc read implementation?
In LDD3's (Linux Device Drivers 3rd Edition book) scullpipe, what do the parameters in static int scull_read_p_mem(char *buf, char **start, off_t offset, int count, int *eof, void *data) mean?...
View ArticleCapture keys sent to a specific application in Linux
Ideally, I would like to capture the keys sent to a specific program (and only to that program) e.g. Dwarf Fortress. [and later send keystrokes to only that program - which is easier to do]A workaround...
View ArticleHow to convert hex_dump of packets, which were captured in kernel module, to...
I am writing a kernel module on Linux (Xubuntu x64). The version of the kernel is 5.4.0-52-generic. My kernel module is capturing traffic from an interface and printing it in hex:Nov 10 14:04:34 ubuntu...
View ArticleInstalling Linux Mint in Virtual Box Win10 Kernel panic
first up I don't even know if this is the right thread to post in, if not I'm sorry.For my OS-class I need to install Linux Mint in Virtual Box.I don't have any experience in that sort of thing and...
View ArticleAdding a new system call Linux 5-9.8 and make it appear on boot screen
I'm trying to add a new system call to linux -5.9.8 for this I've been following this tutorial from a prev question and this one and this from a guide they are both really similar and everything does...
View ArticleHow to check whether an ethernet interface is up with some IP or not in LINUX...
While searching this i came across /sys/class/net/eth0/operstate(will contain "up/down") and /sys/class/net/eth0/carrier(will contain either "0/1") , whose values depends on whether the interface is...
View ArticleWhy Docker shows host memory in container? [duplicate]
What's the real technical issue preventing the container from displaying a limited amount of RAM?
View Articlemmap flag ‘MAP_FIXED_NOREPLACE’ undeclared even with a supported kernel
I'm trying to build an application which uses the MAP_FIXED_NOREPLACE mmap flag. From the man page, it seems that the flag is supported since linux kernel 4.17. I currently have 5.4.0-53-generic...
View ArticleA pthread with SCHED_RR and higher real time priority failed to preempt a...
Preface:I have two thread one kernel thread and one userspace pthread. I assume pthread set to SCHED_RR with higher rt priority should preempt a kthread with SCHED_RR and lower priority.I assume with...
View ArticleIn Linux kernel, I need to access the a write page (swapped) and encrypt it...
So i started that I found the function which is swap_writememory, and I need to access the data within that page to encrypt it but it seems like I do not know how to do so.
View ArticleWhy does my malloced version of this code fail?
I'm working on some linux driver code. I'm still pretty new to C, and I just can't get to the bottom of some behaviour that I'm seeing. I'm not even sure if it's standard C behaviour or some...
View ArticleGet Character String Written to Custom /dev/ file
I'm currently working with a custom device file that I install. I'm very new to this and having trouble understanding how to get the data I write to it in the command line.For example I write data to...
View ArticleWhy is the first parameter of sctp_inet_listen struct socket* instead of int
I want to study the source code of the kernel network part to understand how the network part of the kernel works.But when I looked at the listen function, I found the above problem. Use man to see...
View ArticleWhy couldn't I get the source code line from addr2line?
I'm trying to get the line of source code from addr2line for the rasbian 5.4.y kernel.My host environment is ubuntu18.04.2 on virtualbox, and I'm compiling the kernel with arm-linux-gnueabihf-...
View Articlehotplug of USB devices such as physical keyboard to smartphone Sony Xperia...
in order to use USB peripherals on my smartphone thanks to an OTG adapter,I reinstalled a stock ROM, then flashed a slightly more advanced custom Kernel (.zip here...
View ArticleHow is a process waken up if slept in interruptible state?
The kernel code can explicitly put the process to sleep if it's waiting for some task to occur. Now, if the task is put in TASK_INTERRUPTIBLE state, it can wake either by explicit wake up call or by...
View Article"Diabling IRQ #9" error at boot in manjaro linux
Whenever i start my pc. I see this error "Disabling IRQ #9". I only have manjaro on my pc (no dual boot) and wanted to know the cause behind this problem. Sudo systemctl returns no error but when i run...
View ArticleWhy is the run queue of Completely Fair Scheduler in linux kernel always null...
For an assignment for my OS course, I need to modify the CFS scheduler of Linux kernel 5.9.I figured out that to complete the objective of the assignment I needed to modify how the scheduler adds...
View ArticleUnderstanding user/kernel crossing in context of user threads vs. kernel threads
From an OS class, I learned (using SunOS as an example) that user level threads are always mapped to a kernel level thread through the abstraction of a LWP, and that it's the kernel threads that...
View Article