I am trying to build a pintool that should be able to instrument an open() syscall that targets a specific file/directory and replace the file path argument wit
If I compile the following program: $ cat main.cpp && g++ main.cpp #include <time.h> int main() { struct timespec ts; return clock_gettime
I am trying to send a notification message from a kernel module to user space application using netlink sockets interface and custom netlink protocol. My unders
how to bind an external temperature sensor with fan emc2103 in Linux. As emc2103 has its own temperature sensor which its use to control fan speed. but I want t
I am newbie for Linux kernel, I cloned the Linux source from its repo on GitHub. I cannot find the file sys/mount.h nor the mount function. Do you know where is
To my knowledge, I understood that the scheduler_tick() function periodically gets called by the timer interrupt with the frequency of HZ. I'm new to kernel dev
I am using IWD as a wireless daemon in userspace. Driver and firmware are loaded. When the socket is called by IWD using nl80211, it passes to nl80211 and than
I'm implementing a "mini firewall" and use the filter function with the signature shown below: unsigned int minifw_inbound_filter(unsigned int hooknum, struct s
I have tested the rt process's latency by cyclictest. And found that when I launch a few lower priority rt processes(priority is 40) the high priority rt proces
I am trying to build a set of Linux kernel modules with multiple source files: obj-m += mst_pciconf.o mst_pci.o mst-objs += nnt_device.o nnt_dma.o nnt_pci_conf_
Preface: I have two threads: one kernel thread and one userspace pthread. I assume pthread set to SCHED_RR with higher rt priority should preempt a kthread with
I'm reading the mail list about LKMM: Add volatile_if(). The control dependency is somewhat subtle since it is easily forgotten by us developers. So I wonder i
I'm using ftrace to trace ip_local_out() in kernel 5.4.20. I'm sure ip_local_out() is available to trace: /sys/kernel/debug/tracing # cat available_filter_funct
I am trying to use a grsecurity gcc plugin that I found on their unofficial linux kernel source tree (the respectre_plugin/ one). My GCC version is 4.7, I modif
To use memory mapped I/O, we need to first call request_mem_region. struct resource *request_mem_region( unsigned long start, u
How do I include the linux kernel headers as part of the SDK package in Yocto? I'm using Yocto 1.8 (fido) in an embedded project and want to do out-of-tree ker
I finished reading https://www.redhat.com/en/blog/introduction-virtio-networking-and-vhost-net and couldn't understand exactly. I understand how virtio works. H
When a process ends, the Linux kernel can re-assign the user-space page frames (the pages in physical memory) to the user-space pages (in virtual memory) of ano
I am trying to add some stuff to Linux task_struct. In this area I copy a string from the user and try to store it in my struct. I try to debug my code by add
I want to create a TUN interfae I type command in adb like below mkdir -p /dev/net busybox mknod /dev/net/tun1 c 10 200 chmod 666 /dev/net/tun1 ip tuntap add d