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

Add Julia kernel with flag to JupyterLab

I'm using the package PackageCompiler.jl to create an image that already has some packages precompiled, such as Plots.jl. This speeds up a lot the process of starting a new notebook. The only thing I need to do is run julia --sysimage…
Davi Barreira
  • 1,597
  • 11
  • 19
3
votes
2 answers

What is the earliest point in the XP boot process that I can set a breakpoint?

Just messing around with WinDbg a bit. I have a couple of virtual machines set up so I can try to do some kernel debugging on a Windows XP VM. If I wanted to catch the system at its earliest possible moment during boot, where, or on what, would I…
romandas
  • 4,086
  • 7
  • 29
  • 33
3
votes
0 answers

How to implement the refcount in the file handle struct?

I have an assignment which asks for implementing some files related syscalls as well as the structures needed to make them work (i.e. file table and file handle). This is my implementation of the structures: // File Handle…
3
votes
1 answer

Error Starting Kernel: '_xsrf' argument missing from POST

I don´t know if this error was caused maybe because I deleted one environment from my anaconda navigator, but every time I try starting jupyter lab (from various environments in anaconda or from the default python installed on my computer) I get…
Mauricio
  • 31
  • 4
3
votes
1 answer

Java process not respoding but resuming after I do a thread dump with jstack -F

I have an weird issue with a Java process which is stuck (once/twice per day) and it only recovers after I execute: jstack -F ${PID} While the Java process is stuck, If I try to do a thread dump with jcmd, I receive AttachNotSupportedException. I…
Cristi
  • 180
  • 15
3
votes
1 answer

OpenCL race condition with clSetKernelArg

From the Khronos website on the thread safety of clSetKernelArg: All OpenCL API calls are thread-safe except clSetKernelArg, which is safe to call from any host thread, and is safe to call re-entrantly so long as concurrent calls operate on…
3
votes
1 answer

How can I delete a dkms module in (arch) linux?

I have a dkms module. I wanted to remove it. I did sudo dkms remove .... But when I update to a newer kernel, my package manager tries to build that module and failed, so it added it again. How do I prevent that and remove the module?
user13526499
3
votes
4 answers

Understanding the behavior of unshare CLONE_NEWNS

I wrote a small C program that simply does an unshare(CLONE_NEWNS) followed by system("bash"). The man page says that the process should have its own namespace. So, in the shell I tried unmount /cgroup (cgroup is mounted on the original machine).…
i0exception
  • 372
  • 4
  • 12
3
votes
2 answers

access to nanosecond in struct inode

In linux kernel v4.19.3 In my module, I need to get the inode last modification time in nanosecondes and not in seconds, but it always returns 0. struct timespec64 i_mtime; for example in this code : pr_info("nsec = %ld - sec =…
Charlycop
  • 69
  • 6
3
votes
2 answers

Where I should use "swapgs" instruction

Hi I'm a kernel learner and have some questions about swapgs. According to AMD's documentation, it swaps the gs.base hidden register and KernelGSBase MSR. Furthermore, the addressing with "gs:XXXX" are calculated as "gs.base + base + (scale*index) +…
3
votes
1 answer

Unable to install a kernel even though it compiled successfully

I'm trying to install a linux-Kernel version 4.9.228 in my ubuntu 20.04. The kernel compiled successfully, without any errors. I also executed the command: sudo make modules_install install When I rebooted my system, to check whether it made…
Qasim Khan
  • 154
  • 10
3
votes
3 answers

Where the structure "struct page" is stored on the linux kernel?

I learned that linux kernel manages the memory and the unit for allocate/deallocate the memory is 4KB, which is the page size. And I know that this pages are handled by struct page. I got a actual code here. struct page { unsigned long flags; …
H.Potter
  • 137
  • 2
  • 9
3
votes
2 answers

How I can listen for a tcp port in kernel space (freebsd)?

As the title says, How I can work with tcp sockets in kernel space? Is there any tricky notes?
Taha Jahangir
  • 4,774
  • 2
  • 42
  • 49
3
votes
1 answer

Shutdown computer, how operating systems achieve it? (C Kernel development)

I've been developing an OS lately in C. But how can I shutdown the computer? By saying 'shutdown the computer', I mean a force shutdown. How can I do that in C kernel development? Any help would be appreciated.
FastDeveloper
  • 367
  • 5
  • 15
3
votes
1 answer

copy_from_user() error: destination size is to small

I'm writing ioctls handler for kernel module and I want to copy data from user space. When I'm compiling code with disabled optimizations (-O0 -g flags) compiler returns following error: ./include/linux/thread_info.h:136:17: error: call to…
mmichal10
  • 322
  • 2
  • 13