Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Browsing all 12244 articles
Browse latest View live
↧

How do I use SystemTap to track all kernel function calls? kernel crash while...

kernel crash while systemtap probe all kernel funciotns// all.stpglobal tar = "fork";probe begin{ printf("===ready===\n"); }probe kernel.function("*"){ if(execname() == tar){ printf("%s\n", ppfunc());...

View Article


Image may be NSFW.
Clik here to view.

How to locate the souce code of this kind of item, vfs_unlink.cold+0x1d/0x55,...

I compiled the linux kernel, 5.10.7 with CONFIG_DEBUG_INFO=y.Then from dump_stack() inside the kernel, then inside gdb,l *do_unlinkat+0x1b0 can locate the source code, but l *vfs_unlink.cold+0x1d...

View Article


Access physical address from kernel space in Linux

I'm writing a kernel module that needs access to a memory region outside the Kernel and User spaces. I know the physical address and the size of such a memory. I've tried with ioremap(), but the...

View Article

Does a kernel driver's `release` file-operations handler wait for other fops...

In the case of linux kernel device drivers there is the file_operations struct, or fops struct, which allows the driver to define handlers for various file operations.My question is about the .release...

View Article

how decrease UDP backlog to once packet at a time?

Most articles are about how to increase a UDP socket's receive buffer size to handle more packets, but I need a solution to decrease the UDP receive buffer to accept only 1 packet at a time and...

View Article


'scull' device from ldd3 is not shown under /dev/

Following the book ldd3 (- Linux Device Drivers 3 ed.) and using, also, source code files available here (as suggested by another stackoverflow's user here), I am able to compile the scull device...

View Article

Why doesn't kprobe work on Centos 7 kernel 4.16.6?

I'm on CentOS 7 (Linux 4.16.6)root@host # uname -r4.16.6-1.el7.elrepo.x86_64Following the document, I add a kprobe to trace sys_clone:root@host # grep sys_clone /proc/kallsymsffffffff81084c70 T...

View Article

What does request_mem_region() actually do and when it is needed?

I'm studying on writing embedded linux driver, and decided to fire a few GPIOs to make sure I understand the book (LDD3, chap9.4.1) correctly.I am able to control the correct GPIO pins as intended...

View Article


drop_caches doesn't empty my cache totally

the situation is simple like this:ubuntu@ip-172-31-46-92:~$ free -hw total used free shared buffers cache availableMem: 978Mi 247Mi 526Mi 101Mi 3.0Mi 201Mi 504MiSwap: 0B 0B 0Bubuntu@ip-172-31-46-92:~$...

View Article


bootlin kernel doesn't boot from UBIFS

Following bootlin embedded linux course and faced an issue (similar to UBI layout volume not found but my problem is further than original one)I am creating rootfs and data volume images:mkfs.ubifs -d...

View Article

linux -> how to sort in sequence [closed]

how can i get the output below in sort sequence order of 1,2,3,10,12 instead of 1,10,12,2,3 ?avi@tech> get hardwareNumber=...

View Article

segmentation fault, and queue not clearing sometimes in beaglebone black...

I use three different threads to read can messages from socket CAN raw and to write can messages to another socket CAN raw, The message read every 2 seconds are put onto queue and retrieved from queue...

View Article

Check that spinlock is working in linked list

I've implemented a basic linux kernel module with /proc.It can add elements to the linked list with echo add number > /proc/list and remove elements from the list with echo remove number >...

View Article


can kernel identify which userapp got killed/closed, among few apps it is...

I'm writing a linux kernel driver, which creates a char device file "/dev/my_file".Multiple userspace applications do open() of this file and use the ioctl cmd provided to register app specific data....

View Article

make bzImage error while kernel compilation process

I am on my ubuntu with Linux 5.8.0-40 Kernel. I am trying to change the kernel to 4.19 along with the RT preempt patch. These are the steps I followed.Downloaded the tarball for 4.19 from here and...

View Article


How to add inline function info in dump_stack() of Linux Kernel?

Obviously, we can use dump_stack() in Linux Kernel to get the call stack information, but I found the inline function information is lacking in the output of dump_stack().For example:The call stack is:...

View Article

Unable to run bpf program as non root

I am trying to run a simple bpf program that I wrote. But I am not able to run it as non root user. Below is the program I am trying to load, It basically gets the pointer to my map whose fd is map_fd...

View Article


How can I check that spin_lock is working correctly?

I've implemented a basic Linux kernel module with /proc.It can add elements to the linked list with echo add number > /proc/list and remove elements from the list with echo remove number >...

View Article

String modifiers not working in sscanf in kernel.h

#include <linux/kernel.h> //sscanfint err;char a[32];char b[32];char c[32];char test[20]="add abc de";char *p=test;err=sscanf(p,"%s %[^\t\n] %s",a,b,c);printk("%d Data correctly parsed %s %s...

View Article

Linux kernel module build - make infinite loop

I am trying to build a kernel module on my raspi cm4. Somehow the make command is called forever tho(I killed it with ctrl-c). Does anyone have an idea why this might occur?Thanks for the...

View Article
Browsing all 12244 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>