make error: No such file or directory
I am new to kernel module development. So I started with simple hello world kernel module I am using "The Linux Kernel Module Programming Guide" book for the reference (it is addressing to kernel 2.6)....
View Articlecompletely eliminating the timer tick in modern Linux (>=5.0)?
I'm trying to completely eliminate timer interrupts on a set of cores on a quiet machine. These are the only interrupts regularly processed by these cores. I've isolcpu'd them, and built a kernel with...
View ArticleWhy rax is set to -ENOSYS before TRACE_IRQS_OFF
See https://elixir.bootlin.com/linux/v5.0.21/source/arch/x86/entry/entry_64.S#L168.Why does RAX have to change?Why is -ENOSYS chosen?Copied from the above link:ENTRY(entry_SYSCALL_64) UNWIND_HINT_EMPTY...
View ArticleLinux CFS (Completely Fair Scheduler) latency
I am a beginner to the Linux Kernel and I am trying to learn how Linux schedules processes.I have read some books on the Linux Kernel and gone through the links from IBM...
View ArticleHow to flush the CPU cache for a region of address space in Linux?
I am interested in flushing cache (L1, L2, and L3) only for a region of address space, for example all cache entries from address A to address B. Is there a mechanism to do so in Linux, either from...
View ArticleHow to export functions from modules (*.ko) that have circular dependencies
I have two Linux kernel modules (*.ko files). They have circular dependencies like this:mod1.ko uses functions exported by mod2.ko mod2.ko uses functions exported by mod1.ko I can't merge the modules...
View ArticleReal time Linux: disable local timer interrupts
TL;DR : Using Linux kernel real time with NO_HZ_FULL I need to isolate a process in order to have deterministic results but /proc/interrupts tell me there is still local timer interrupts (among other)....
View ArticleHow to export symbol from Linux kernel module in this case?
I've got two kernel modules built, one of which is a net_device. My net_device module A depends on module B which provide some extra control mechanism to export device info.I want module B to be able...
View Article"CROSS_COMPILE_ARM32 not defined or empty" while compile Linux Kernel
I'm trying to rebuild Linux Kernel for Sony XZ phone. There is error occurring in compile process with the message bellow and I haven't found solution to solve yet. Can anybody help me...
View ArticleUprobes not working in v4.14.x kernel with SystemTap on 32-bit ARM platform
I rely on Uprobes for the dynamic instrumentation of a shared library. While everything I need is working perfectly on x86 systems, unexpected errors appear when working with the Linux v4.14.x kernel...
View ArticleHow do I build an app for an old linux distribution, and avoid the FATAL:...
I distribute a statically linked binary version of my application on linux. However, on systems with the 2.4 kernel, I get a segfault on startup, and the message: "FATAL: kernel too old."How can I...
View ArticleGET WARNING: modpost: missing MODULE_LICENSE() when LKM is Compiled with...
I have a LKM named RtmNetlinkLKM.c and compiles and run fine. The moment i update its makefile to compile with other src files, it starts giving warning `WARNING: modpost: missing MODULE_LICENSE()The...
View ArticleWhere has the owner field of struct proc_dir_entry gone? [ Linux Kernel ]
According to the list of API changes in the 2.6 kernel series on LWN the .owner field of struct proc_dir_entry was removed in the 2.6.30 Kernel.So here's a couple of questions:Was it really ever...
View ArticleLinux kernel compile error Unsupported NR_CPUS for lb tracepoint
I am trying to compile linux kernel 3.4.0 on Ubuntu 16.04, but I am getting an error: In file included from kernel/fork.c:79:0: include/trace/events/sched.h:249:2: error: #error "Unsupported NR_CPUS...
View ArticleHow does fork() process mark parent's PTE's as read only?
I've searched through a lot of resources, but found nothing concrete on the matter:I know that with some linux systems, a fork() syscall works with copy-on-write; that is, the parent and the child...
View ArticleERROR adding monitor mode interface in kali linux
ERROR adding monitor mode interface in kali LinuxWhat should I do? I am a beginner. really I do not know what to do next. root@kali:~# airmon-ng checkFound 2 processes that could cause trouble. Kill...
View ArticleKernel error: IRQ remapping doesn't support X2APIC mode, disabled x2apic
I need to enable x2apic on Intel(R) Xeon(R) CPU E3-1225 v5 @ 3.30GHz, and I find x2apic was supported in cpuinfo:But when kernel started, I find error message:[ 0.138328] IRQ remapping doesn't support...
View ArticleMuch higher cpu usage for usleep on Debian 8 than on Debian 6
A performance issue is encountered for our software system after we upgraded the OS from Debian 6 to Debian 8.From the top -H results, it looks like that all the threads using usleep(200) in system...
View ArticleAre Screenshots Implemented through the OS? If so, how?
I've been wondering how a screenshot is implemented in devices. Specifically, how are they implemented in high level functions. As an application developer, you may be given a high level function to...
View ArticleHow to support properly kernel suspend/resume feature in kernel driver?
I have a kernel driver with char device :static const struct file_operations xxxxx_fops = { .owner = THIS_MODULE, .read = xxxxx_read, }; In my userland code, I open the char device and use read call in...
View Article