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

Can one retrieve a socket's port from the Linux Kernel data type `struct sock`?

MotivationI'm trying to write a bpftrace program to trace out when a socket is ready for reading by hooking into the kprobe sock_def_readable. I will get a struct sock to inspect. I'd like to map it...

View Article


How are platform drivers managed in linux

Helo All,I am trying to learn embedded linux.Please provide clarity on below:As DTB provides Board and SOC related information will it be sufficient to make sure correct drivers will be enabled?How a...

View Article


How to compile Linux kernel module without kernel Makefile?

I have an ARM Linux device, but I don't have the Makefile of the kernel to build a kernel module.I have GCC cross compiler to this arch.How can I compile a kernel module without the Makefile of the...

View Article

What static struct in linux kernel code use for

Hi I am following the book Linux device driver development to write a driver in Linux. In an example code as below:struct my_gpios { int reset_gpio; int led_gpio;};static struct my_gpiosneeded_gpios =...

View Article

How to find the scsi_host_template functions for a block device?

I was looking into the IO path of the Linux kernel, and towards the bottom in the function scsi_dispatch_cmd(), the driver code is invokedrtn = host->hostt->queuecommand(host, cmd);So, for my...

View Article


How nl80211 library & cfg80211 work?

I want to learn about how nl80211 and cfg80211 works in detail. Function flow, how nl80211 interact with network tools like wpa_supplicant, iw. Plz suggest me some useful links or books to refer.

View Article

Finding ACPI Device to Initiate Platform Device for Kernel DMA API

I am trying to perform a DMA operation on my Dell Inspiron 5500 laptop. I would like to transfer, say a Linux page worth (4K on my machine), of data from one physical memory location to another. My...

View Article

Using wait_event_interruptible and wake_up_all together

For a class project involving scheduling processes using blocking and locks, we're supposed to use two kernel functions:int wait_event_interruptible(wait_queue_head_t q, CONDITION);void...

View Article


kernel crash - general protection fault: 0000 [#1] SMP RIP:...

After 5 minuters we change MTU from 1500 to 4000,system is crashed and reboot. This is the vmcore-dmesg.txt. And from the vmcore, we find that function inet_sendmsg fail to access address RAX:...

View Article


I am trying to kprobe the function of tcp_synack_timer in a custom BPF...

I want to use the aforementioned function because I want to use the struct request_sock_queue and struct listen_sock . Is there a way to use them (perhaps a different function)?

View Article

Linux module __must_check annotation

I am learning about Linux kernel module development. I read articles and tutorials, and I found a site which supplies source code for a simple char device. In the code a __must_check is used for one...

View Article

Install linux-headers on debian unable to locate package

I am trying to install the linux-headers for my Kernel Version 3.4.61+ and Debian Version 7.1I typed this Commands:apt-get updateapt-get install linux-headers-$(uname -r)On the last command I always...

View Article

About Updating linux-headers

I did dist-upgrade on kali 2.0, after update when i tried to reboot it waited too long i thought it locked or something.I manually turn off pc.After restart it was working normally but when i try to...

View Article


verifying where 'kworker/n:n' (in ps -aux) is invoked from

In the result of 'ps -aux', I couldn't find how to verify that 'kworker/...' are created from and what module/functions are related to it.Please let me know how I find out kworkers are from with pid or...

View Article

How are parameters passed to Linux system call ? Via register or stack?

I trying to understand the internals of the Linux kernel by reading Robert Love's Linux Kernel Development.On page 74 he says the easiest way to pass arguments to a syscall is via :Somehow, user-space...

View Article


.ko file is not getting generated while cross compilling the kernel

I have accidentally deleted the files enc28j60.ko and enc28j60.mod.o in "./drivers/net/ethernet/microchip/" from the Linux kernel source tree, to regenerate the same I have tried with recompiling the...

View Article

How to decode /proc/pid/pagemap entries in Linux?

I am trying to decipher how to use /proc/pid/pagemap to get the physical address of a given set of pages. Suppose from the /proc/pid/maps, I get the virtual address afa2d000-afa42000 which corresponds...

View Article


/proc/[pid]/pagemaps and /proc/[pid]/maps | linux

I'm trying to get my head around the two files mentioned in the title.I've looked up what the bits are; however, I'm failing to understand how to extract useful info from them (or I'm simply...

View Article

Is there any API for determining the physical address from virtual address in...

Is there any API for determining the physical address from virtual address in Linux operating system?

View Article

How does a serial driver get attached with a tty port

I am looking at Linux sample UART driver code herehttps://github.com/martinezjavier/ldd3/blob/master/tty/tiny_serial.cBelow is snipped from the code where UART driver is sending data to the tty...

View Article
Browsing all 12244 articles
Browse latest View live


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