ubuntu18.04 vscode kernel module program ERROR: identifier "KBUILD_MODNAME"...
My environment: Ubuntu 18.04, kernel: linux-5.3.0-53 vscode: lastestCommand for fixing linux/module.h not find asm/xxx.hcd /usr/src/linux-headers-5.3.0-53/includesudo ln -s asm-generic/ asmMy...
View ArticleExport all files included in defconfig
I'd like to have directory tree containing only the files used by a specific Linux build.For example if I use https://github.com/LineageOS/android_kernel_moto_shamu with make shamu_defconfig; make...
View ArticleWhy some processes(even they are user processes) could not be migrated to a...
Why some processes could not be migrated to a certain cpu by cpuset(7)?I found that these processes could not be really migrated to a certain cpu(Though when you check the cpuset filesystem,it seems...
View Articleimage compiled with -fPIC and -pie not loading
compiled code with the -fPIC and -pie option and with certain checks able to see that binary generated is not havinf TEXTREL and position independent.But once i load the image i can see that it is...
View ArticleWhat is the difference between .dts file and .dtsi file?
What is the difference between .dts file and .dtsi file? Is there a difference when generating device tree blobs? When to use one or the other?
View ArticleUnderstanding how Linux syscall() works
I'm trying to understand what the Linux syscall() function expects to get. I'm looking at the man of the syscall and I can't seem to figure out the amount of parameters and what they represent. In the...
View ArticleHow to compile and run the virtio_test under linux/tools/virtio/virtio_test
How to compile and run the virtio_test under linux/tools/virtio/virtio_test? Can someone share the exact compile and execution commands? To be more specific,1. How to compile the virtio_test?2. How to...
View ArticleLinux Kernel code in memory check with sha256 sum
Is there a way of finding the loaded kernel code inside the memory? I mean the bootloader loads the kernel and executes it. The kernel extracts itself and start to initialize the hardware and runs...
View ArticleI intend to run a periodic routine. Which way could guarantee more precise...
I intend to run a periodic routine. Which way could guarantee more precise delay? nanosleep or timer_create, timer_settime?The type of their input argument is same(struct itimerspec).It would be better...
View ArticleLimitations on printing to kernel logs
I'm working on a linux device driver (kernel version 2.6.32-37). I debug my code mostly by printing to the kernel logs (using printk). everything goes well, until my computer suddenly stop responding....
View ArticleHow to validate multi queue disc?
I am trying configure multiqueue qdisc for ethernet controller which is having total 8 queues.using tc commandI ran below command.> tc qdisc add dev eth0 root handle 1: multiq> tc filter add dev...
View ArticleWhat is the difference between do_execve() and execve() in Linux?
In the following link I have the following code:static int run_init_process(const char *init_filename){ argv_init[0] = init_filename; return do_execve(getname_kernel(init_filename), (const char __user...
View ArticleChanging Linux kernel module boot order
I am experimenting with boot optimization on my Raspberry Pi 4 - Yocto based embedded Linux system and would like to set when vc4-drm kernel module is loaded. I would like to make vc4-drm kernel module...
View ArticleWhen should I use the GRUB_TIMEOUT option?
In the GRUB file I came across with the GRUB_TIMEOUT option. From the docs I understand that it should be zero if we don't want to use the menu or set it to be some positive integer in order to set the...
View ArticleLinux machine Reboot/crash on fdisk -l command after disk detach [closed]
I have problem statement that from vm detach the disk and execute fdisk -l command, but whenever I try to fdisk -l command machine get crashed and reboots automatically.Can any one please provide...
View ArticleHow does a thread in NPTL exit?
I'm curious how a single NPTL thread exits, from implementation perspective.What I understand about glibc-2.30's implementation are:NPTL thread is built on top of light weight process on Linux, with...
View ArticleError when instantiating i2c slave device
Hello I am trying to create an i2c slave device on my beaglebone black(debian 10) which is running the kernel version 4.19.94-ti-r42.I was going to implement my own i2c slave device driver by writing...
View Articleebpf packet filter on payload matching
I am new in ebpf & xdp topic and want to do learn it. My question is how to use ebpf filter to filter the packet on specific payload matching? for example if the data(payload) of the packet is 1234...
View ArticleHow can I modify the config file (/proc/config.gz) in linux (Android)?
I am installing docker on Android. there are some configurations related to cgroup which are not enabled. I could find it by extracting the file /proc/config.gz. now it seems i have to modify the file....
View Articleinit_task symbol not found in /proc/kallsyms (kernel 4.5.4-1-ARCH)
I am trying to locate the address of task_struct of a thread. First of all, I need to get the address of task_struct of the init_task, then I iterate the whole list and finally get the task_struct of a...
View Article