Questions tagged [kernel-module]

A kernel module is a run-time loadable object file that is loaded into operating system kernel to add functionality to a running kernel. Examples include device drivers and other kernel items.

2005 questions
0
votes
3 answers

How to perform write back of dirty L1-L2 cache lines in ARMv8

I'm looking for a way to flush the L1-L2 cache using a kernel module. Is there a way to completely flush the whole cluster cache (4 core configuration) or even better, write back the dirty cache lines into main memory?
0
votes
0 answers

Link static library into kernel module using bitbake

I want to build a kernel moduel which has external symbols to a static library for my BBB using bitbake. This issues is that my static lib gets not linked into the kernel module and remains with missing symbols. Using this Makefile sequence: obj-m…
x'mpl'
  • 53
  • 11
0
votes
0 answers

Why ASLR generates SIGSEV if the stack pointer is reassigned

I am writing a char device that takes as input with ioctl a function pointer and a buffer pointer. I want to modify the user machine context so that back in user mode, that function is executed with a new stack pointed by that buffer…
Angelo
  • 175
  • 1
  • 13
0
votes
1 answer

Linux kernel: what are instruction cache and mp-IRQ subsystem within a terms of function interception via replace?

I'm trying to implement a kernel function intercept (replacing a System.map's pointer to function, using this old method (c) Silvio); according to this forum post, some possible flaws may be related to instruction cache and mp-IRQ sources, which…
kagali-san
  • 2,646
  • 6
  • 40
  • 84
0
votes
1 answer

How to use kernel GPIO descriptor interface

I'm trying to develop a simple Linux kernel module that manages a bunch of sensors/actuators pinned on the GPIO of a Raspberry Pi. The GPIO functionalities I need are quite simple: get/set pin values, receive IRQs, ... In my code, I have a…
0
votes
1 answer

How to interpret LLC-Load-Misses from perf stats

I had posted a question in similar context over here After figuring out a few issues, I have brought down the jitter. I will describe my scenario. My kernel boot parameters look like: nmi_watchdog=0 intel_idle.max_cstate=0 processr.max_cstate=0…
Cooshal
  • 700
  • 6
  • 20
0
votes
1 answer

Why on many drivers, the return value of functions is handled with variables?

I see in a lot of drivers code like static rettype fun(argtype arg) { rettype ret; // do some stuff and change ret accordingly return ret; } couldn't that be handled faster when directly returning a value or gotoing when possible? That…
Garmekain
  • 674
  • 5
  • 14
0
votes
0 answers

Windows Kernel Driver Signing issue (WFP/Inspect)

I'm learning about WFP/Inspect kmdf. I'm using VS 2017. So far I've succesully build my own kmdf: ------ Rebuild All started: Project: inspect, Configuration: Win10 Debug x64 ------ Building 'inspect' with toolset 'WindowsKernelModeDriver10.0' and…
user7437344
0
votes
0 answers

why does `synchronize_rcu()` not deadlock when beening called inside a read lock block?

synchronize_rcu() is used to waits only for ongoing RCU read-side critical sections to complete. If so, it should been blocked forever when beening called inside a read block. However, the following code works well on my linux kernel, why? void…
river
  • 646
  • 5
  • 20
0
votes
0 answers

Does RCU synchronization hold only a global lock for all readers of different data types?

As a Linux kernel programmer, I have been learned to use RCU instead of rwlock to obtain high performance. However RCU only provide the following API without parameter to service protection of all kinds of data types.…
river
  • 646
  • 5
  • 20
0
votes
1 answer

How to build kernel and kernel modules for specific kernel version magic?

I need to build kernel to have vermagic 3.10.28-gbc1b510-33899-g9fa745e SMP preempt mod_unload modversions ARMv7 but after building and verification some module via modinfo it displays 3.10.28 preempt mod_unload modversions ARMv6 Looks like I…
Daro
  • 35
  • 9
0
votes
1 answer

Kernel Module to reboot linux

How can I EXPORT_SYMBOL in my dynamic module to reboot my linux system. EXPORT_SYMBOL(register_restart_handler); EXPORT_SYMBOL(unregister_restart_handler); EXPORT_SYMBOL_GPL(kernel_restart); how to use struct notifier_block and char *cmd in void…
0
votes
0 answers

Kernel-headers in openWRT

How to bring kernel-headers in openwrt custom based image? In the image which it is built by us in which how to bring build file. /lib/modules/kernel-number-generic/build: No such file or directory. Which file or directory we want to enable to bring…
Mohammed Harris
  • 124
  • 1
  • 12
0
votes
2 answers

Rebuilding/Updating kernel module

Hey there, following problem: I'm using a rather weird linux distro here at work (Centos 5) which seems to have an older kernel (or at least some differences in the kernel) and you can't simply update it. The program I need to install needs a…
0
votes
1 answer

Couldn't link kernel provided function to my user defined kernel module

I'm writing a kernel module that works with page table entries, in order to implement a new page replacement policy. I want to get a list of page table entries owned by a specific process. So far I have retrieved a linked list of vma structures…
Reza
  • 11
  • 3
1 2 3
99
100