Skip to content
Advertisement

Tag: kernel-module

How to send actions directly to input event?

I have a touch screen with events at /dev/input/event12 and /dev/input/event13. /dev/input/event12 is the main touch input, and in essence, I’d like to send instructions to the event directly to control behavior (ie, click location etc). Tools like xdotool do not want to work because this device is being set as a second pointer (see: https://dwm.suckless.org/multi-pointer/) and the recommendation of

Cannot get memory allocated from `flex_array_alloc` when requesting a relatively big size in linux kernel

I’m doing some linux kernel development. And I’m going to allocate some memory space with something like: ptr = flex_array_alloc(size=136B, num=1<<16, GFP_KERNEL) And ptr turns out to be NULL every time I try. What’s more, when I change the size to 20B or num to 256,there’s nothing wrong and the memory can be obtained. So I want to know if

Prevent removal of busy kernel module

I have a simple kernel module that creates a character devices and does nothing with it. I wrote this user-space program that tests the character device. The program exits after 10 seconds. But if in the meantime I remove the module with rmmod or modprobe, then after 10 seconds the program segfaults or hangs, and there is a kernel oops.

lm75 kernel module available in userspace

I’m using the lm75 kernel module to interact with a sensor on a custom board. Every things works fine, I have my device mounted in /sys/bus/i2c/devices/5-0048. But I would like to let the user set the max temp hysteresis so in other words let the user write into the temp_max_hyst file. The permission for this file is read only except

IRQCHIP_DECLARE: init function is not being run

I am trying to use the Xilinx interrupt controller driver in an embedded ARM FPGA system I am developing. (https://github.com/torvalds/linux/blob/master/drivers/irqchip/irq-xilinx-intc.c) At the end of this driver is the line: IRQCHIP_DECLARE(xilinx_intc_xps, “xlnx,xps-intc-1.00.a”, xilinx_intc_of_init); I have added an entry in my device tree for the interrupt controller. However, from what I can tell, the xilinx_intc_of_init function is never called during startup. I

Get all mount points in kernel module

I’m trying to get all the mount points in a kernel module. Below is what I’ve come up with. It segfaults because of the strcat. Is this the correct way to get the mount points? Will this work? if so how do i fix the segfault? If not, how does one go about getting the mount points in a linux

How to create light weight kernel thread?

When I create a kernel thread (kthread_run), it becomes a new process.(I could see it using top command) . How can I create a light weight kernel thread(like the one we have in user space)? If I am not wrong, kthread_create will eventually call fork() which will call clone() with appropriate configuration to create a new process/lw process. Is it

Advertisement