Error when Compiling Linux Kernel for Android 11 (R) Beta version 1 with...
I am using an Ubuntu 20.04 machine with the newest version of platform-tools installed and (I believe) all necessary dependencies.I created a new directory ~/beta1-kernel-coral and within this...
View ArticleHow to check if filesystem is already mounted using C/C++
Hi I am writing an application which mounts cgroup as shown belowmount("cgroup", "/sys/fs/cgroup", "tmpfs",0,NULL);I am able to do this but I want to add a check to know if this is already mounted, how...
View ArticleDoes google check any OS security algo before installing it's app as inbuilt...
Does google check if the OS is not doing any illegal activity before installing it's app as inbuilt apps?My doubt is that is it possible for the certain company to modify the next OS update in such a...
View ArticleSort a merged file by second field in a reverse order
I have merged two files into one file and I am trying to sort the merged file but it looks like I am missing something because one of the files that I Have merged is empty.Below I show the description...
View ArticleWhere the structure "struct page" is stored on the linux kernel?
I learned that linux kernel manages the memory and the unit for allocate/deallocate the memory is 4KB, which is the page size. And I know that this pages are handled by struct page.I got a actual code...
View ArticleDocker: what API changes in the newer Linux kernels will cause new distros...
Can someone point to a list of the API visible changes to the Linux kernel for each version?And a list of which distributions use each of those API features?This, way, we can tell whether a given...
View ArticleRTNETLINK answers: Operation not supported [closed]
In fact I want to use pipework to add a ipoib interface into docker container.pipework use ip command to do this. But when running the command ip link add link ib0 name ib0.2613 type ipoibI get...
View ArticleDisabling CPU cache in a kernel module
I was reading a paper on the rowhammer exploit and came upon the following,"...we perform the Rowhammer attack from a kernel module (i.e., with full privileges), which allows us to cultivate optimal...
View Articleethtool: set/unset autonegation, RX/TX pause
I was looking at the sources of ethtool, particularly at function do_spause() where autonegotiation, rx/tx pause can be enabled/disabled. I noticed that at first it issues ioctl() for...
View ArticleMan pages for alloc_chrdev_region(), register_chrdev() etc system calls
I need to know where can I find the man pages for the system calls/routines related to device drivers:register_chrdev() alloc_chrdev_region()...etc.I searched in the below links and found...
View ArticleHow to set a fragment of the MMIO space in a different cache attribute?
I'd like to map the whole MMIO with ioremap() or pci_iomap() and then set as WC only few pages.set_memory_wc() uses __pa() to convert the virt to phys address but that is invalid for MMIO...
View ArticleHow does WSL[2] pose limitations on a guest linux system?
As soon as I got WSL2 on my Windows PC, I installed an adapted CentOS 8.2 version. As I explored it, I found that I could read and write in the host's NTFS file system out of the box. It was also...
View ArticleLinux mouse stuck issue [closed]
when I plug in anything the USB3 port, the mouse goes stuck. How can I debug it?Mainboard: MSI B450-A PROKernel Version : 5.3.0-59Thanks.
View ArticleHow to comprehend "You can use the slab cache allocator(i.e....
As per the documentation(https://www.kernel.org/doc/html/latest/core-api/memory-allocation.html), which says[emphasis mine]:If you need to allocate many identical objects you can use the slab cache...
View ArticleLinking kernel module with a static lib
I'm trying to link my kernel module with an external static lib, like this:obj-m += my_prog.omy_prog-objs := some/path/lib.a# all the standard targets...For some reasone, the above Makefile doesn't...
View ArticleWhat is the variable in a C function definition that is before the function...
I was interested by a YouTube video about coding a kernel module for linux, and so I looked up how and I found a guide.In the guide, it includes this basic code#include <linux/module.h> //...
View ArticleWhat is the most efficient way to get I/O metrics in Linux?
We are working on a High Performance Computing project where we need to extract I/O metrics but we want to take as minimum resources as possible while doing it. So I was wondering what's the most...
View ArticleWhat are the differences between "__GFP_NOFAIL" and "__GFP_REPEAT"?
As per the documentation (https://www.linuxjournal.com/article/6930),which says:Flag Description__GFP_REPEAT The kernel repeats the allocation if it fails.__GFP_NOFAIL The kernel can repeat the...
View ArticleIs it possible to avoid calling the original function with kprobe?
I'm trying to implement inline hooks with kprobe.The document says The handler's return value is currently ignored., is it possible to avoid calling the original method when specific condition is met?
View ArticleUnable to install a kernel even though it compiled successfully
I'm trying to install a linux-Kernel version 4.9.228 in my ubuntu 20.04.The kernel compiled successfully, without any errors. I also executed the command :sudo make modules_install installWhen I...
View Article