Questions tagged [kernel]

In computing, the kernel is a computer program that manages input/output requests from software, and translates them into data processing instructions for the central processing unit and other electronic components of a computer. The kernel is a fundamental part of a modern computer's operating system. This tag is for general questions regarding code that runs in the context of an operating system kernel.

This tag is for general questions regarding code that runs in the context of an operating system kernel (kernelspace, as opposed to userspace), including writing custom kernels. Questions about specific kernels should use a relevant tag (eg. , , ).

This tag is not about other uses of the word "kernel" - for example, questions about CUDA kernels should use the tag.

SOURCE

Wikipedia

9344 questions
3
votes
1 answer

Linux Driver: Copy memory from different user-process

At the moment I try to write a memory-hacking library for Unix. But I faced so many problems using ptrace/procfs so I decided to write a driver for that. The problem is, I am unable to find a way to retrieve memory from a different virtual memory…
Flo
  • 31
  • 2
3
votes
1 answer

Kernel memory leak detector

I have enable the "Kernel memory leak detector" option inside kernel hacking and rebuilt/reboot the system, for now the kmemleak file exists inside the /sys/kernel/debug folder but seems like I cannot trigger the scan by "echo scan >…
Boooooo
  • 157
  • 3
  • 12
3
votes
2 answers

How can i print current time in kernel?

i'm a beginner of linux. (sorry about my poor english) I should print current time and do something through system call in linux. I did other things but failed to print current time.. I wrote…
wendykr
  • 245
  • 1
  • 3
  • 9
3
votes
1 answer

In /proc/sockstat which TCP states count as 'inuse' and which count as 'alloc'?

For example, in /proc/net/sockstat , does a TCP socket in CLOSE_WAIT get counted as 'inuse' or 'alloc' ? In the kernel source net/ipv4/proc.c I see that sockstat_seq_show is called when getting the info from /proc/net/sockstat. However I cannot…
Party Time
  • 485
  • 5
  • 10
3
votes
1 answer

How to save and load Gaussian process for production

How can I save and load Gaussian process models created using the GPy package? Here's how I define the model and optimize for its parameters: # define kernel ker = GPy.kern.Matern52(rescaled_x_train.shape[1],ARD=True) +…
owise
  • 1,055
  • 16
  • 28
3
votes
1 answer

Spyder: variable explorer does not show variable for connected remote kernel

Spyder variable explorer works fine for a local kernel; however, it does not work for the remote kernel. Indeed, the connection to the kernel and running the codes works well but non of the variables are shown in the varibale explorer. Here is some…
ir0098
  • 127
  • 1
  • 13
3
votes
1 answer

How to build a linux kernel module against with a prebuilt kernel output directory?

My customer send me the prebuilt kernel output directory(They can not release the kernel source tree to us). This output directory is as below(under…
Micheal.zu
  • 85
  • 1
  • 11
3
votes
1 answer

Unable to add a custom system call on x86 ubuntu linux

I am new to this and just learning about the kernel, and I am trying to add a custom call to kernel 4.20.4. This is the steps that I did. First I create the file (kernel/printmsg.c) that contains the code. #include #include…
CSLser
  • 193
  • 1
  • 11
3
votes
1 answer

Create a symlink to a file in kernel module

I am trying to create a symbolic link to a file in a Linux kernel module. With the following code, I have created a directory in sys/kernel and then created a file in that directory: // Create the base directory in sys/kernel if…
Łukasz Przeniosło
  • 2,725
  • 5
  • 38
  • 74
3
votes
2 answers

useful linux kernel debug options to turn on

What are some of the non-default kernel debug config options that one should add to a standard kernel config? 2.6.x kernels seem to enable debugging support by default but with a basic set of options. I am curious to hear whether there are…
software engineer
  • 271
  • 1
  • 4
  • 15
3
votes
1 answer

Ubuntu 18.04.1 on VMware Fusion 11 results in kernel panic with Packer

I am trying to create a VMware virtual machine using Packer, with Ubuntu Server 18.04.1 as guest OS. However, creation of the VM fails after having sent the boot command. The specific error seems to be related to APIC, although the boot command…
Golo Roden
  • 140,679
  • 96
  • 298
  • 425
3
votes
1 answer

Performing an ioctl from the kernel-space

I'm writing a kernel driver that needs to perform an ioctl on another device. I realize this is not the best way to handle the code, but this is just a temporary fix for now. I'm getting back error code -22 (Invalid argument) from my ioctl call in…
user545199
3
votes
1 answer

How does /sys/dev/char get populated in Linux?

I'm learning to write a simple kernel module that implements open, read, write, close, ioctl syscalls for reading/writing in kernel memory (something like a shared memory / IPC demo). I used to call mknod for binding the major/minor number allocated…
3
votes
2 answers

what is kernel mapping in linux?

what is kernel mapping? What are permanent mapping and temporary mapping. What is a window in this context? I went through code and explanation of this but could not understand this
user1434287
  • 381
  • 3
  • 16
3
votes
1 answer

Trying to compile kernel module in Windows Subsystem for Linux error

When I run make after creating this makefile from this website http://www.tldp.org/LDP/lkmpg/2.6/html/x181.html When I run make in WSL I get make -C /lib/modules/4.4.0-17134-Microsoft/build…
1 2 3
99
100