What are the optimal values to set for busy-polling?
I have an application written in C++ for reading market data. The networking layer is implemented using boost asio, effectively tcp ssl websockets. When the market throughput is high, I can observe...
View ArticleHow to fix compiling raspbian from scratch error with .tmp_vmlinux.kallsyms1...
I am completely new and trying to learn to compile Linux from scratch so I had no idea where to begin debugging make: *** [Makefile:234: __sub-make] Error 2 error trying to compile Raspbian from...
View ArticleHow to write a Linux Kernel Driver for UART? [closed]
How to write a Linux Kernel Driver for UART?Through UART, I receive a continuous and asynchrone flow of data: the main concern here is to not miss any data.I use serdev...
View ArticleIs there a minimal set of files to keep from a Linux kernel compile for...
After I compile a Linux kernel, I need to keep the huge source directory in my disk for the further external module's compiling.I can not simply run make clean, because this fails me when I compile...
View ArticleCan a Linux Kernel Configuration Option Be Active Without Appearing in .config?
While working with the Linux kernel, I encountered a situation where some kernel configuration options did not appear explicitly in the .config file. To investigate further, I manually tested a few...
View ArticleERROR in file_io_posix.cc, trying to locate scaling_cur_freq and...
I'm trying to execute a container based on ubuntu 20.04 and some additional dependencies.Ended up in an error where the project (something external) is looking for files/programs such as the...
View ArticleHow to enable Asus WMI LED manually in terminal by ID found in asus-wmi.h
How I can in the Linux terminal turn on or off LED when I know its id e.g. 0x00050031, 0x00050032, 0x00060078 from file asus-wmi.h./* SPDX-License-Identifier: GPL-2.0 */#ifndef...
View ArticleHow to export a symbol from an external module?
I am coding outside the kernel source tree. There are two modules, the first one printt have a function printtty() to print string to the current tty, and the second module hello which invokes...
View ArticleSIGTERM to child process kills parent too [closed]
when I dopid_t pid = fork();...if (pid == 0) execvp(...);...if (pid > 0) { kill(pid, SIGTERM); }it kills the child , that's okay ,but it kills parent process too (not sure that is important but...
View ArticleChanging default home directory in VScode's SSH funcitonality
I have been given access to a proprietary server- user@[ip]The problem is, when i try to ssh via VScode, it defaults to /home/user, which does not exist. Instead, there is another directory- /data/user...
View ArticleBuilding toolchains for compiling Android kernel on aarch64 host
I am using a free ARM (aarch64) compute instance from Oracle Cloud as a development machine. I would like to compile an Kernel for my Android phone (arm64), but I'm having trouble with selecting the...
View ArticleHow do you write directly to user memory from kernel mode in Linux?
I am trying to write directly from a kernel module into a process that it creates without a copy. Note that I cannot simply allocate the memory in kernel mode and map it to userland like you would...
View Articlelikely and unlikely macros
Are there any standard ways ( using profilers ) to check if using these gcc recognized branch prediction macros can benefit certain clock cycles in terms of instruction pipelining? How can we measure...
View Articleproc_create and proc_mkdir can't handle existing files, and proc_remove also...
I'm writing a linux kernel module for a class assignment and I've run into a bit of a puzzling issue.First, the module creates a folder under /proc/, and creates a file under that folder,...
View ArticleWifi backports build fails against 6.1.36 with "Unknown symbol...
I'm trying to build backports modules from most recent release of a wifi driver [1]. I'm using NXP (Variscite) kernel 6.1.36 [2]. Build works fine (find script below). However, during boot the brcmfmac...
View ArticleWhy is kernal process running on an isolated core? [closed]
I am using htop to see the process running. I notice that on core 68, where I am running my c++ program, 60% cpu usage is in red i.e. is being used by the kernel process. My process usually takes...
View Articleconfigfs do not mount device-tree/overlays
I'm working on a Cyclone V SOC FPGA from Altera with a double Cortex-A9 processor. The embedded system (linux 4.15.7) is created with Buildroot-2018.02. U-boot is used to load the system i-e FPGA.rbf...
View ArticleHow to fix: fatal error: openssl/opensslv.h: No such file or directory in...
I have RedHat Enterprise Linux Server 7, and I downloaded the linux kernel version 4.12.10 which I am trying to compile but when I execute the following command:make modulesI get the following error:...
View ArticleReplacement or similar command for "mknod" on WSL2 [closed]
I am using Qemu to build a virtual Vexpress-A9 on WSL2.But when I use "sudo mknod -m 666 dev/tty1 c 4 1", I get "mknod: tty1: operation not permitted".I guess it's because WSL2 doesn't support this...
View ArticleWhat does VM_MIXEDMAP and VM_PFNMAP flags mean in Linux kernel?
These two flags are used by drivers, but I don't understand why we need them. What would happen if I don't set these two flags on VMA? When should I use them? Could someone give some usecases? Thanks.
View Article