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
3 answers

What language allows me to interact with an OS's kernel

I want to have a go at kernel programming, mostly to understand it more, not to try to create my own OS or anything. But I am confused as to even what language I need to program in to do this let alone what IDE(if there would be one) & compiler I…
user593747
  • 1,484
  • 4
  • 32
  • 52
3
votes
5 answers

Operating System Scheduling Algorithms

What is the best algorithm to use for scheduling an application that will support 10K concurrent threads with heavy I/O but low CPU usage? Links to papers are appreciated.
McGovernTheory
  • 6,556
  • 4
  • 41
  • 75
3
votes
1 answer

Virtual Memory Handling

I'm working on a PE Loader, just like windows loader my target is an executable not DLL,i tried first loadlibrary but faced reallocation problems,got some code to fix it, but it didn't work with all targets (some exe's needs to be loaded at the same…
motash
  • 39
  • 4
3
votes
1 answer

How to install USBIP in Docker Container

I want to use USBIP in an Ubuntu 20.04 Docker Container. I tried installing the "linux-tools-generic" Package, but when i run USBIP afterwards i get the message: You may need to install the following packages for this specific kernel: …
Marius
  • 33
  • 4
3
votes
0 answers

Tying together user-virtual, kernel-logical, and kernel-virtual addresses conceptually

After looking at the Linux x86 virtual memory map and reading about the differences between kernel virtual and kernel logical addresses (see 1, 2, 3, 4, 5, etc.), I've come away a little confused. I created a diagram to help me explain and get…
wxz
  • 2,254
  • 1
  • 10
  • 31
3
votes
0 answers

insmod: ERROR: could not insert module xline.ko: Invalid module format

I am trying to build a driver for a Heber X10i I/O controller on my Fedora 34 but I fail to insert the module into kernel, says "Invalid module format". I followed all available tutorials/hints/Q&As but still no luck getting this running, am I…
3
votes
1 answer

How to overwrite operand value of x86 `movq` instruction via c pointer in linux kernel

Currently I have written a code segment using assembly on one page pageA in linux kernel.The code is SYM_CODE_START(sr_function) movq $0, %rdx movq $0x7ffff7fc6000, %rsi movq $0x19016bc83000, %rcx movq $9, %rdx movq $0, %rdx …
yaoxin jing
  • 55
  • 1
  • 4
3
votes
1 answer

Why does the device tree have to list interrupts for a UART device?

On the device file tree listed here we can see an UART device: uarta: serial@70006000 { compatible = "nvidia,tegra210-uart", "nvidia,tegra20-uart"; reg = <0x0 0x70006000 0x0 0x40>; reg-shift = <2>; interrupts =
Rafaelo
  • 33
  • 1
  • 15
3
votes
2 answers

Linking to a kernel

Please, does anybody know how to link boot with kernel? For example I have this code for boot: [BITS 16] [ORG 0x7C00] [global start] [extern _main] start: call _main cli hlt and this for my C++ file: #include #include int…
FrewCen
  • 636
  • 1
  • 7
  • 21
3
votes
2 answers

Where is SYSCALL() implemented in Linux?

In my last job interview I was asked what seems to be a very straight forward simple question: Q: In which library syscall (The one is kernel space not the wrapper in libc) is implemented? A: I answered The interviewer told me that it's…
user16011868
3
votes
1 answer

Difference Linux Kernel 5.10 with / without PREEMPT-RT patch

With the current Version 5.10 of a vanilla linux kernel, one can configure the kernel as a low-latency version as the mainline have accepted multiple merge requests from the Preempt-rt patch team. However if one patch the vanilla kernel with it's…
sirius
  • 89
  • 6
3
votes
1 answer

How to disable graphical console after kernel boot?

I have a Linux kernel booting up. It comes up in native screen size graphical framebuffer mode due to use of kernel mode setting. During the kernel boot, the screen shifts from text to graphical console mode and lots of kernel messages get dumped.…
Frank Miller
  • 499
  • 1
  • 7
  • 19
3
votes
1 answer

Does OpenBSD support parallel Kernel access

I tried to figure out if multiple processes or threads can execute concurrent syscalls, without one of them sleeping. That's to say: Does OpenBSD use something like a Big Kernel Lock. One would expect, that parallel Kernel access is possible. I…
prometheus
  • 31
  • 1
3
votes
1 answer

How do AMD64 page entry base address fields encode a 52-bit address in 40 bits?

I'm trying to manually walk the paging structures in order to convert a virtual address into its physical address. I have a question about the physical base address fields stored in the PML4E, PDPE, PDE, and PTE. The page size on my system is 4KB.…
Arush Agarampur
  • 1,340
  • 7
  • 20
3
votes
2 answers

Is there anyway to debug a windows kernel with secure boot on?

Is there any way/trick that i can debug a windows kernel that has secure boot on? when i try to turn on debug mode when secure boot on windows says that i need to turn it off. The target machine is a win 10 x64. EDIT: I am using VMware and this is a…
OneAndOnly
  • 1,048
  • 1
  • 13
  • 33