Skip to content
Advertisement

Tag: kernel

Add syscalls to linux kernel

I’m new in working with kernel. I want to add a linked list to my kernel, and I try to fix it like this link : Linux Kernel Programming–Linked List here is code’s that I added to sys.c : syscall defenition: and my struct for linked list: and when I compile the kernel, I saw this error: thanks for your

Using sysctl interface from kernel module

I am trying to access tcp_pacing_ss_ratio defined in tcp_input.c from a kernel module. The variable can be modified using the sysctl command in user space. It is however not exported and cannot be referenced directly from the module. What is the simplest way to access a sysctl entry from a kernel module? Answer From the sysctl(2) manpage: use of this

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

Writing to Linux device driver causes infinite loop

I have been writing a kernel space device driver that can be read from and written to from user space. The open, read, release operations all work perfectly. The problem I am having is with the user-space code that should access the device driver and and write something to it. The user-space program writes to two files: 1) to a

where is the __init function of ext4?

As every module that is to be inserted in the kernel needs an __init function. where can I find the __init function of the original ext4 module written by linus torvalds? I want to make some changes in it. Answer I suppose you’re looking for this method : https://github.com/torvalds/linux/blob/master/fs/ext4/super.c#L5781 This __initmethod is the main one of the module because it

Kernel debugging – gdb step jumps out of function

I’m trying to do understand the kernel network stack for a security research for my university. That’s why I try to debug the linux kernel. So far I’m doing quite well but I ran in a problem when trying to use qemu and gdb for debugging. The problem is as follows: I boot my linux system: make boot And connect

implement a read operation list in debugfs

i’m implementing a kernel module. using several techniques. 1 of them is to give read/write to different module variables. i was able to read/write all variables except the list i have in my module. the linked list: i would like to have a corresponding file in debugfs that will print the full list. i tried all the ‘simple’ read functions

Advertisement