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

When is `struct file*` is created for open file in kernel space? [duplicate]

I am learning Linux Kernel mostly reading LDD3. And I am a bit confused. That said (ch3, p.53):The file structure represents an open file. (It is not specific to device drivers; every open file in the...

View Article


gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’

first I install cross-tool, then I build the toolchain, then I want to build the kernel but While compiling kernel 2.6.34 for RAM, repeatedly got the error...

View Article


how to prevent mouse input event in linux use c++

Is there any way to prevent part of mouse event on linux system using c++? I want implement a function that like: turn a switch on ,then the whole system disable mouse right click. or other switch on...

View Article

Round and curly bracket block of code in C

Can anyone explain what this macro evaluates to: #define memcpy(dest,src,n) ({ \void * _res = dest; \__asm__ ("cld;rep;movsb" \ ::"D" ((long)(_res)),"S" ((long)(src)),"c" ((long) (n)) \...

View Article

how to fix problem with initialization from incompatible pointer type

I'm trying to create a kernel module, which creates a subdirectory in the /proc directory, and contains a file that can be written and read from user space.But always when I compile the module I get...

View Article


add-on creation in suse linux

I have downloaded a new kernel version(4.14) and built with Suse Linux, so kernel.rpm files gets generated. But I want to repack this newly built kernel with existing suse-linux.iso image. So, for this...

View Article

How to use QEMU's deterministic record and replay feature for a Linux kernel...

QEMU supports deterministic record and replay as documented at: https://github.com/qemu/qemu/blob/v2.9.0/docs/replay.txtHowever, I could not get replay working for a full Linux kernel boot: it always...

View Article

Kernel compilation warning: objtool: ioctl.isra.11()+0x268: unsupported...

When I compile my kernel project, I get this warning:warning: objtool: ioctl.isra.11()+0x268: unsupported intra-function callWhat does is means?

View Article


C unused pointer parameter

I have found the following function definition in Linux source: static int __ref kernel_init(void *unused){ int ret; kernel_init_freeable(); /* need to finish all async __init code before freeing the...

View Article


How do the likely/unlikely macros in the Linux kernel work and what is their...

I've been digging through some parts of the Linux kernel, and found calls like this:if (unlikely(fd < 0)){ /* Do something */}orif (likely(!err)){ /* Do something */}I've found the definition of...

View Article

How IOMMU unmaps the IOVA comming from different pheripherals through DMA

I have been trying to get the information on this for so long and still haven't got anything solid. So, what I have learned so far is that the IOMMU converts the IOVA provided by the DMA to the...

View Article

How to know linux scheduler time slice?

I'm looking for the value of the time slice (or quantum) of my Linux kernel. Specific Questions:Is there a /proc file which expose such an information ?(Or) Is it well-defined in the Linux header of my...

View Article

How to properly disable SMAP from a linux module?

I am following a tutorial from here.I have the following code:#include <linux/init.h> // Macros used to mark up functions e.g. __init __exit#include <linux/module.h> // Core header for...

View Article


Why doesn't TCP timer use min-heap

It is a normal choice to use min-heap as a timer to achieve a high performances. We can see it in libevent/libev. But when reading TCP source code, I find that the linux kernel doesn't use min-heap to...

View Article

Linux Kernel Modules for Listing Tasks - BFS

I am trying to implement Breadth First Search to display kernel tasks list using linux module but unable to do. Below is the module for DFS , can anyone suggest how to do BFSvoid dfs(struct task_struct...

View Article


Embedded C in SystemTap - dereferencing pointer to incomplete type

I am following this tutorial: https://blog.lexfo.fr/cve-2017-11176-linux-kernel-exploitation-part1.htmlAs I try to see what the netlink_sock contains in state, I use this embedded C code:%{ #include...

View Article

end kernel panic - not syncing: attempted to kill init! exitcode = 0x00007f00

enter image description hereI cannot access terminal and recovery mode is also not working. Please, can someone help me?

View Article


Memory consumption for sockets in linux

Our system had a memory footprint growing gradually.After doing too many debugging with the profilers, didnt reach the exact point of issue.Now after verifying random things on the system, it got...

View Article

Memory consumption for sockets in linux & compaction behavior

Our system had a memory footprint growing gradually.After doing too many debugging with the profilers, didnt reach the exact point of issue.Now after verifying random things on the system, it got...

View Article

dereferencing pointer to incomplete type ‘const struct cred’

I want to understand this error. Printing UID of a process code:printk(KERN_INFO "User ID = %d\n", (task)->cred->uid);The error:error: dereferencing pointer to incomplete type ‘const struct cred’

View Article
Browsing all 12332 articles
Browse latest View live


Latest Images

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