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

How to change kernel base address

I am trying to boot linux on a zedboard and monitor all memory accesses through Programmable Logic. We're first trying to boot linux with a start address above 0x40000000.I want all the memory request...

View Article


Why use calloc to initialize the allocated memory to zero?

We know that the heap is an area of demand-zero memory that begins immediately after the uninitialized data area and grows upward (toward higher addresses). By demand-zero, it means the first time the...

View Article


Linux Mass Storage kernel module g_mass_storage use with FAT [closed]

I am currently configuring a portable (embedded linux based) device which becomes a Mass storage provider once plugged into a computer.The mass storage media must be compatible with Windows and Mac,...

View Article

Is there any limit to TCP receive queue and send queue?

Firstly, I know that we can use setsockopt() to control SNDBUF (I know it is not recommended but I want to know how it works and how bad it is), and this will fix the buffer size to a value we want...

View Article

problem with KVM vm installation from terminal, host machine is ubuntu20.04...

so in the past when i was installing vms in kvm, i was using kvm GUI, but now i want to install virtual machine from terminal, this is what i tried to do:virt-install --network bridge:virbr0 --name...

View Article


Can't get owner information from struct sock: sk_peer_pid is always NULL

I'm trying to find the PID from struct sock, so I used the following code:struct task_struct *get_task_from_sock(struct sock *sk){ struct task_struct *task = NULL; if (sk == NULL) { pr_info("sk is...

View Article

Why vfs_write() adds arbitrary number of zero bytes

I am on the kernel 2.6.37 on an embedded system writing some very specific module driver. And I need to store some data into a file. So, when the module is 'insmoded' I do:static struct file...

View Article

Trying to hook a linux kernel system call

I am trying to hook a system call from a linux kernel custom module.The module loads but printk doesn't seem to print anything to dmesg from the new function.#include <linux/kernel.h>#include...

View Article


How do you force the Linux kernel to use MLDv1 instead of MLDv2? [closed]

I am testing compatibility with MLDv1 and want a linux host to use v1 report and done messages on a specific interface. In the case below I would like interface Eth0 to use version 1 of the...

View Article


What is responsible for populating argc in linux?

To print the number or arguments in an executable I can use rsp :.globl _start_start: # we want to print the number of arguments this was called with # %rsp contains the number of arguments when _start...

View Article

What do I need to point my makefile at to make it build a kernel driver...

I am working on a simple driver for a class. I am using this makefile:obj-m := mysourcefile.oKERNELDIR ?= /lib/modules/$(shell uname -r)/kernelall default: modulesinstall: modules_installmodules...

View Article

Page Fault in Linux Kernel

I have few questions after reading Mel Gorman's book Understanding the Linux Virtual Memory Manager. Section 4.3 Process Address Space Descriptor says kernel threads never page fault or access the user...

View Article

Image may be NSFW.
Clik here to view.

CPU cores are underutilised while running n=-1 jobs

I have read that the Green bar represents the normal user process and the Red bar represents the time spent in kernel(kernel, iowait etc).I'm running a jupyter-notebook that runs n=-1 jobs, and by...

View Article


no include path in which to search for stdint.h

When I was building linux package in local computer (Fedora with intel cpu) for embedded system with arm-based chip, the error showed:[root@v17 linux-3.10.x]# make...

View Article

What happened to USB MTP gadget driver in mainline Linux kernel?

I'm trying to make a embedded device work as a MTP device, using USB gadget driver.I know have Android switched from mass storage gadget to MTP gadget for quite a while, and found the source code for...

View Article


/sys/class/net/ and ConditionPathExists in Linux service file

I am working on a requirement where the SNORT should run as a daemon on Wi-Fi wlan0 interface. This is taken care as a system file. The snort command is written in a script file and the Snort service...

View Article

poll() from userspace on a sysfs file and sysfs_notify() from kernelspace...

My kernel module for raspi, written to get a double light barrier, reads monotonic time if each of two input gpio´s edges are rising and an interrupt occours. The time value is passed via normal sysfs...

View Article


Buffering of packets from a certain set of IP addresses in the qdisc module

for providing fault tolerance to Virtual machines, a high availability solution was proposed known as...

View Article

Does Linux kernel have main function?

I am learning Device Driver and Kernel programming.According to Jonathan Corbet book we do not have main() function in device drivers.#include <linux/init.h>#include <linux/module.h>static...

View Article

why malloc() call mmap() and brk() interchangeably?

I'm new to C and heap memory, still struggling in understanding dynamic memory allocation.I used tracing linux system calls and found that:if I use malloc to request a samll size of heap memory, then...

View Article
Browsing all 12241 articles
Browse latest View live


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