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
From what I understand, a typical buffer overflow attack occurs when an attack overflows a buffer of memory on the stack, thus allowing the attacker to inject m
Below is excerpted from linux kernel: /* * "id" is the POSIX thread ID. We use the * files pointer for this.. */ int filp_close(struct file *filp, fl_owner_
I am writing a kernel module and in it I have the following piece of code: dma_dev->coherent_dma_mask = DMA_BIT_MASK(64); I do not always want 64 in there
I recently wrote a module implementing these functions. What is the difference between the two? From my understanding, the copy_..._user functions are more sec
I've got a problem about creating a directory within a linux kernel module. What I want: Creating a directory within a kernel module. Here is my actual code:
I am writing a custom block driver in the Linux kernel and in my make_request routine, on writes I need to read the data of the bio's specified sector (from the
It's strange that struct cdev has struct kobject member, do any body knows the reason?