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

Why GDB cannot find the source lines of the Linux kernel when debugging...

I've been trying to get the kernel to execute within QEMU using GDB to remote debug it but I'm not able to step through or set breakpoints. Here's the GDB session:linux (master *) $ gdb vmlinux GNU gdb...

View Article


How to set file to immutable for all user (Root user also) and no one can...

I am trying make a immutable file that is anyone can read only and can't do any modification into it. i.e - No one canwrite into it or delete it or move it. For this is referred chattrthis LINUX...

View Article


Kernel Module: No printk messages showing. Is init function being called?

I have a simple module, written as follows:#include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> MODULE_LICENSE("GPL"); static int __init hellomod_init(void) {...

View Article

Is there any difference between mmap vs mmap64?

On a 64-bit machine, is there any difference between mmap vs mmap64?There are other such as fstat64 vs fstat.answer: On a 64-bit Ubuntu 18 LTS, Verified that mmap and mmap64 func addr are the same....

View Article

How to implement Async I/O efficiently in the kernel

This question is about low-level async I/O system calls like send + epoll/aio_read and others. I am asking about both network I/O and disk I/O.The naive way of implementing those async calls would be...

View Article


Learning embedded linux bsp via online sources [closed]

Which are the best resources availble to learn linux bsp online. I have unsuccessfully tried to find something for a long time now. Also how can I be proficient in linux bsp by learning on my own.

View Article

Linux SCHED_OTHER, SCHED_FIFO and SCHED_RR - differences

Can someone explain the differences between SCHED_OTHER, SCHED_FIFO and SCHED_RR?Thanks

View Article

How to use my custom syscall from the terminal?

My system call takes an integer and returns long. I can use it in a C code like syscall(549,1). But I would like to use it from the terminal not from a C code. Can you please help me?

View Article


Memory Limit and CPU Limit in Docker Container

UPDATE:found a lot of questions and discussions on stackoverflow about this topic. And although they are marked as accepted answered and started by thousands of users, they do not seem to be the right...

View Article


Understand about dma engine and dma controler?

As I know in the system ( ex: SOC,...), maybe exist both dma controler (DMAC) and dma engine I wonder Do have relative between DMAC and DMA engine or each has its own effect?

View Article

Fail to change CS register value from kernel mode. invalid opcode: 0000

From module code with this snippet I'm trying to change the value of CS register:asm("pushq %rax"); asm("mov $0x10,%rax"); asm("mov %rax,%cs"); asm("popq %rax"); Actually the CS register contains...

View Article

Lock/unlock mutex under timer interrupt

Is it safe to lock a mutex in a timer handler (kernel space)? I have two kernel modules which read /write to the same I2C device: - first module: launch a timer when loaded. Read I2C register under...

View Article

Image may be NSFW.
Clik here to view.

Linux x86-64 syscall hooking, path names garbled

I've been experimenting with Linux syscall hooking on a x86_64 Linux system, following the standard procedure of patching the sys_call_table method table as found in /proc/kallsyms.However in my...

View Article


How to use spi-gpio on Linux 4.19?

I want to use spi-gpio on Linux4.19 and my cpu is am4379. here is my spi-gpio device-tree follow document.fpga { compatible = "spi-gpio"; #address-cells = <0x1>; #size-cells = <0>;...

View Article

Providing permissions for a root user in a kernel module

Linux Kernel 5.0.0-37I'm writing a function to manage permissions to be provided as a function pointer to the struct inode_operations. Here is a simplified stub implementation:#include...

View Article


Changing virtual page premissions

I am trying to override the kill command In my module by replacing the pointer stored in sys_call_table, to a pointer to function i implemented. I used the kallsyms_lookup_name() syscall to get the...

View Article

In ss -s, what is the kernel counter actually counting?

While troubleshooting a problem on an OEL 7 server (3.10.0-1062.9.1.el7.x86_64), I ran the commandsudo ss -s Which gave me the output of:Total: 601 (kernel 1071) TCP: 8 (estab 2, closed 0, orphaned 0,...

View Article


Issues implementing EPT

I'm having an issue implementing EPT in a hypervisor I'm developing. I'm receiving error no. 48 (EPT violation. An attempt to access memory with a guest-physical address was disallowed by the...

View Article

Is mov %esi, %esi a no-op or not on x86-64?

I am a bit confused by the comment in one of the header files for the Linux kernel, arch/x86/include/asm/nops.h. It states that<...> the following instructions are NOT nops in 64-bit mode, for...

View Article

Understanding loff_t *offp for file_operations

I'm designing a device driver that simply reads and writes to a character buffer. My question is however regarding the two functions in the file_operations structure read and write. I don't truly...

View Article
Browsing all 12241 articles
Browse latest View live


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