Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [kernel-modules]

Use this tag for questions about loading, configuring, or compiling them. See also /drivers for questions about which modules to use for specific hardware. A kernel module is a bit of code that can be added into the kernel by the administrator while the system is running, typically providing one feature such as a filesystem.

2
votes
2answers
35 views

Automatic rmmod / modprobe based on dmesg parsing

I am using a MacBooPro10,1 Debian stable (default install with rsyslogd) system for which the trackpad eventually fails (pointer stop working) from time to time as can be seen : $ dmesg [...] [...
5
votes
1answer
37 views

Get all ioctl code and which module they map

By doc. , ioctl signature is int ioctl(int fd, int request, ...) . request is the code of ioctl. Is there any way to know what are all the possible ioctl request code that available in my linux? And ...
0
votes
0answers
27 views

How can I Improve the Performance of My Linux Netfilter module? [on hold]

I wrote a very simple netfiter module. In it, I defined 3 hooks: localout and forward to change packets that go out of my PC and prerouting to do the inverse process. localout & forward hooks: ...
0
votes
0answers
22 views

Unload running kernel module

With lsmod I can watch all kernel modules that running in my linux. How can I suspend and resume spesific kernel module? I tried use modprobe -r <module_name> but got error can't change ...
1
vote
1answer
39 views

Deleted /lib/modules/<kernel version> by mistake. How to recover?

I accidentally deleted my /lib/modules/<kernel version directory>. Here's the full output of sudo rm -rfv /lib/modules/4.14.98+ : pastebin Is there a way to restore the modules keeping the ...
2
votes
2answers
38 views

Feed /dev/random by Octeon RNG

The device is Octeon by Cavium which contains a RNG hardware unit. OS shows that the current entropy pool size is 4096 bytes but entropy_avail is very low. The device crypto modules has ansi_cprng.ko ...
1
vote
0answers
36 views

Why is my gpio access from user space slower?

I did some research on how good I am able to access a gpio while other heavy tasks are executed. With a first test I toggeled a gpio pin from user space using the libgpiod API. With a second test I ...
1
vote
2answers
99 views

How to read DDR4 SPD with ee1004 driver?

I'm trying to read DDR4 RAM SPD data with the new ee1004 driver. I thought that after modprobe ee1004 I would be able to read data from /sys/bus/i2c/drivers/ee1004, however thats not the case (no ...
0
votes
0answers
23 views

Linux kernel module address randomization

I'm booting the same 16.04 Ubuntu server image (4.4.* kernel) and checking where modules are loaded with cat /sys/modules/[module_name]/sections/.text. After every boot I get different text segment ...
1
vote
1answer
85 views

Why is kernel module blacklisting so weak?

There have been several times in the past year or two where I have tried to blacklist Linux kernel modules (either through blacklist.conf or kernel command line parameters), and yet it hasn't worked - ...
0
votes
0answers
29 views

Can I copy over .ko files to another Linux?

I am working on a wifi chipset from Atmel (ATWILC3000) and following its user guide here. I built the kernel and flashed on their development board SAMAD4XULT (has an ARM). Since the kernel modules ...
1
vote
1answer
29 views

Run script after module is loaded due to device tree

Why do I want this? I use the pwm-ir-tx kernel module to blast IR signals from my embedded device. However, when the pwm kernel module is loaded during the boot process, the pin is on high. It takes ...
0
votes
0answers
28 views

Configuring virtio vsock for android (aosp)

I want to use virtio vsock for communication between host machine and vm. My host is running ubuntu. I understand by default virtio vsock module is enabled for ubuntu so I don't need to do any ...
2
votes
2answers
151 views

Mediatek MT7630e not working on Linux 5.0.2 & 4.20

Under Elementary OS Juno, I am trying to use Mediatek M7630e WiFi, which doesn't work. I know that in Fedora 29 with the officially supported Linux 4.20 it does instead, even if not perfectly - I ...
1
vote
0answers
72 views

ASUS USB-AC68 not connecting in Linux Mint

I recently bought a ASUS USB-AC68 which uses the Realtek RTL8814AU chipset, to replace the outdated WiFi card of my (new) PC, but there are no downloadable Linux drivers from the OEM. At the directive ...
0
votes
1answer
24 views

How do I Get Support for Acer E5-573-54zv Touchpad on a Custom Kernel

I'm compiling a kernel just for learning purpose, and I almost get all things working, bluetooth, hdmi, usb, card reader, webcam, wifi... etc. But I can't make touchpad works, all that I know about it ...
1
vote
0answers
21 views

How do I build the mainline kernel with all default Ubuntu modules?

My normal way of building a mainline kernel has been: $ sudo apt build-dep linux $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git $ cd linux $ make localmodconfig $ make -...
0
votes
0answers
14 views

Using GPIO in a kernel module

I am working on a simple kernel module for the Raspberry Pi. This involves using the GPIO. I see that the old gpio_* API is deprecated in favor of the gpiod_* API. However, all of the documentation I'...
-1
votes
1answer
82 views

I have just deleted modules.builtin.bin, and now I can not remove any module

I got this error: rmmod: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file '/lib/modules/4.15.0-29-generic/modules.builtin.bin'
0
votes
1answer
73 views

How to Disable Kernel module installation capability in Unix Based operating system?

As we are living in the Linux kernel rootkit era, Is there any way to Disable any additional module to load into operating system kernel by any user or any operation or command , in Unix? some sort of ...
0
votes
0answers
39 views

linux kernel auto load driver module

I want to know how linux kernel know which module must load on startup ? i know some modules must defined in /etc/modules . but what happened if i change physical hardware ? for example ...
0
votes
1answer
26 views

How can I add support for a new file system type to an existing kernel?

I have an ARM device running an OpenEmbedded-based kernel. A new requirement is going to involve mounting an ISO 9660 file system, but that file system is not currently listed in /etc/filesystems. I ...
0
votes
1answer
35 views

/proc in Kenrel Modules

Currently I am learning Kernel Module Programming reading "https://www.tldp.org/LDP/lkmpg/2.6/lkmpg.pdf" ,and in that book there is an chapter titled as "/proc File System" , I have learnt how modules ...
0
votes
0answers
22 views

How to specify GPIO port for dht11 driver?

I'm working with dht11 sensor on my raspberry pi 3. I found dht11 driver's source code in linux https://github.com/torvalds/linux/blob/master/drivers/iio/humidity/dht11.c And I successfully ...
0
votes
0answers
31 views

Linux kernel: how to load module last

I wrote a kernel simple module, and I can select my module with make menuconfig. The module compiles and executes without a problem. Is there a method to force the kernel to load my module last - ...
0
votes
1answer
123 views

Understanding a dmesg kernel warning message

I am trying to debug my kernel module. When I run it I get the following kernel warnings, but it seems that there is no informative message like other warnings I've seen. Is it possible to get any ...
0
votes
0answers
20 views

Cannot build new image with loadable kernel modules

I am trying to build an image using kernel version socfpga-4.14.73-ltsi from altera to put on my SOC and using Buildroot 2018.02.10 but I am getting an error when I include my loadable kernel driver ...
1
vote
0answers
23 views

Can I replace bzImage and ko files in installed modules separately?

I'm currently trying to debug a kernel module. After installing the kernel, I'm trying to change the kernel a little and a single module a little and see how things work. When I changed the kernel ...
0
votes
1answer
187 views

TUN Module Loaded but OpenVPN /dev/net/tun no such file or directory

lsmod -> tun 16587 0 - Live 0xbf0e1000 Openvpn error: Cannot open TUN/TAP dev /dev/net/tun no such file or directory I tried creating a dummy directory but the error changes to Cannot open TUN/TAP ...
1
vote
0answers
56 views

Trying to use local APIC timer

I'm trying to use the local APIC timer to send interrupts after a certain interval (for a kernel module I am writing). This is not related to scheduling in Linux. I set the clocksource in Linux to ...
1
vote
0answers
42 views

How are Linux kernel modules installed into the Android system.img

I have a question relating to building OS images for devboards such as the Hikey960 and Hikey970. When building a Debian image one has to install the kernel modules built in the kernel into the ...
0
votes
0answers
91 views

bind to vfio-pci or pci-stub at startup

I'm trying to bind a NIC to pci-stub or vfio-pci at startup so my libvirt-managed VM can use it on autostart, but the NIC keeps being claimed by ixgbe. I tried inserting into /etc/initramfs-tools/...
0
votes
0answers
22 views

MAC address is removed with tainted VirtualBox modules on Fedora 29

I am getting crash reports. net/mac80211/driver-ops results in drv_remove_interface. My network interface is removed and I can't connect to the WiFi. I can recover this by shutting down or going in ...
4
votes
1answer
263 views

How to force load kernel module (modprobe -f) on startup?

I would like to load a custom kernel module upon startup on my system (Debian 9). The vermagic string of this module does not exactly match my kernel version, but I can load it using modprobe -f ...
0
votes
1answer
23 views

How to blacklist pwm_backlight?

I want to control PWM from sysfs. I have /sys/class/pwm/pwmchip0 and cat npwm gives 1. However, when I try to echo 0 >> export I am given with Device or resource busy. I checked cat /sys/kernel/...
0
votes
0answers
26 views

unload a module from another module

currently I seek for a way to unload a certain module from another kernel module. One way i think about is usage of call_usermodehelper. So basically an userspace program is prepared doing i.e. echo ...
0
votes
0answers
37 views

Compile single module for RaspberryPi3

I need to compile the Amescon's Raspicomm module. I've cloned the repository from Github obtaining the raspicomm folder with the following files : Makefile Makefile_rpi module.c module.h platform.h ...
1
vote
1answer
94 views

“OOPS” kernel message when unloading a module

Sometimes I receive the flollowing logs from kernel when trying to unload a module using delete_module system call: static inline int delete_module(const char *name, int flags) { return syscall(...
0
votes
0answers
79 views

How to additional public keys to .secondary_trusted_keys?

I am trying to add additional keys to .secondary_trusted_keys. Documentation says, to do so the additional keys has to be signed by a key which is already a resident in either .builtin_trusted_keys or ...
1
vote
1answer
48 views

Order of kernel upgrade commands for gentoo

I have simple bash script to update the kernel. It includes building the kernel, rebuilding external modules, building initramfs with genkernel and updating grub config, here is the script: #!/bin/...
0
votes
0answers
111 views

can't load iwlwifi nonfree firmware after kernel update

My hardware requires the iwlwifi nonfree firmware for working wifi. With the latest kernel version however it stopped being able to load it. The last working version is 4.9.0-7 while 4.9.0-8 does not ...
0
votes
0answers
26 views

USB/IP installation on Oracle Linux 7 for VirtualHere client

I am trying to use VirtualHere Linux console client on an Oracle Linux 7 box. However the client fails to start with an error: [root@hostname ~]# ./vhclientx86_64 modprobe: FATAL: Module vhci_hcd not ...
0
votes
0answers
52 views

Communicating between userland and kernel space (KEXT) on MacOS

In order to make it easier to develop a kernel module, I am considering Loadable kernel modules (LKMs) on MacOS. This way you have a base kernel module and your main kernel module which is an LKM ...
6
votes
1answer
808 views

How to verify a kernel module signature?

When you compile a kernel source, you can choose to sign kernel modules using the CONFIG_MODULE_SIG* options. The modinfo tool should handle the task of verifying the module signature, but there has ...
2
votes
1answer
87 views

Access grab state of evdev device

I need to retrieved the grab state of an evdev device in a program. More specifically, I need to retrieve the state of the grab pointer in the evdev struct seen here: https://elixir.bootlin.com/linux/...
3
votes
2answers
944 views

How to find kernel module for a given device?

I am trying to troubleshoot a problem: usb mouse doesn't work on a freshly installed linux. I suspect the problem is that there is no suitable kernel module/driver for my usb hardware. Indeed: $ ...
2
votes
1answer
69 views

What happens to memory that wasn't freed in a kernel module after unloading?

Suppose I called kmalloc and didn't free that memory before rmmod was called on the module, what happens to that memory? Is it a memory leak and it is completely unusable until restart, or does the ...
0
votes
1answer
105 views

mismatch between kernel version and kernel header

I use an embedded with a bit old kernel 2.6.37. Now we need to update rootfs with more update gcc than the one used on building the image (Instead of 4.3 need to use 5.1, because it will support c++11,...
0
votes
1answer
33 views

Discover WiFi driver with Ubuntu to install on CentOS 7

I installed CentOS 7 Minimal on a Yoga Pro 2. However, I'm not able to "up" the WiFi device w1p3s0 despite following numerous guides with ip link, nmcli and nmtui. The same guides work very well when ...
0
votes
0answers
39 views

Kernel driver, is pinctrl-0 property always needed with GPIO overlay?

I'm creating a kernel driver for SPI controlled display, which is meant to be working with Raspberry PI. I'm not sure about a one thing that I see sometimes in device tree overlays created by other ...