An Open Source Practical ‘Operating System Development Textbook’: Raspberry Pi OS

An Open Source Practical 'Operating System Development Textbook': Raspberry Pi OS

Recently, I’ve seen many friends asking, “I want to learn operating system development, but it’s so hard to get started!” Don’t worry, today I want to recommend a fantastic project—Raspberry Pi OS. It allows you to deeply understand the Linux kernel while getting hands-on experience with a “Hello, world!” on the Raspberry Pi. Let’s discuss … Read more

The Essence and Core Value of C++ Comments: Conveying Design Intent from the Perspective of the Linux Kernel

The Essence and Core Value of C++ Comments: Conveying Design Intent from the Perspective of the Linux Kernel

1. The Essence and Core Value of Comments Comments are non-executable text in source code meant for human reading, and their core value lies in enhancing code maintainability. In Linux kernel development, the principle of “comments should explain why, not how” is followed. For example, in the memory management module, developers might comment, “Using a … Read more

Analysis of the Basic Principles of Kprobe in the Linux Kernel

Analysis of the Basic Principles of Kprobe in the Linux Kernel

Kprobe is a powerful debugging and tracing tool in the Linux kernel that allows developers to dynamically insert breakpoints at almost any instruction in the kernel, enabling the collection of debugging and performance information without the need to reboot the system, modify the kernel source code, or recompile the kernel. In the previous article, Introduction … Read more

Detailed Explanation of the Linux Kernel Boot Process on Rockchip Platform

Detailed Explanation of the Linux Kernel Boot Process on Rockchip Platform

More content can be added to the Linux system knowledge base package (tutorials + videos + Q&A). Back to school season “Linux Driver Comprehensive Course” promotion. Table of Contents 1. Linux Kernel Boot Process Flowchart 2. Self-Extraction Phase 3. Kernel Entry Point 4. Assembly Phase 5. C Function Phase 6. Kernel Boot Scene 7. Executing … Read more

Design and Implementation of ELF File Signature Verification Mechanism in Linux Kernel (C/C++ Code Implementation)

Design and Implementation of ELF File Signature Verification Mechanism in Linux Kernel (C/C++ Code Implementation)

1. Introduction: Why is ELF Signature Verification Needed? In Linux systems, ELF (Executable and Linkable Format) is the core format for executable files and shared libraries. By default, the kernel only checks the format validity of ELF files (such as magic number and architecture matching), without verifying the integrity and legitimacy of the file’s source— … Read more

Linux Kernel Character Module (Part 3)

Linux Kernel Character Module (Part 3)

Linux Kernel Character Module (Part 3) 1. Atomic Operations Atomic operations are indivisible single-step operations that either complete entirely or do not occur at all in a multi-core/concurrent environment, and cannot be interrupted by other threads. They are used to avoid race conditions and ensure the correctness of concurrent data structures without always using heavyweight … Read more

The Signal Delivery Process in the Linux Kernel

The Signal Delivery Process in the Linux Kernel

1 Execute the default action of the signal 2 Capture the signal 3 Re-execute the system call 4 x86_64 architecture – do_signal() Previously, we introduced how the kernel notices the arrival of a signal and calls related functions to update the process descriptor so that the process can receive and handle the signal. However, if … Read more

Overview of the Linux sysfs System

Overview of the Linux sysfs System

Linux sysfs System 1. Overview: What is sysfs? <span>/sys</span> directory is a virtual file system provided by the kernel through the <span>sysfs</span> file system. It was introduced in the 2.6 kernel and is similar to <span>procfs</span> (<span>/proc</span>) but has different design purposes: • Purpose: To display the hierarchy of kernel objects (kobject), along with their … Read more

Linux Kernel Knowledge Triggered by Java int Type Overflow – Fixing the ip2region Bug

Linux Kernel Knowledge Triggered by Java int Type Overflow - Fixing the ip2region Bug

In xdb v4, the internal operation pointers are all using 4-byte unsigned int, with the maximum pointer value being 2^32 – 1, which means the maximum supported xdb file size is 4GiB (3.999..GiB). This is more than sufficient for the 40M open-source data, so there have been no issues in practical use until recently when … Read more

Learning the Linux Kernel – System Calls

Learning the Linux Kernel - System Calls

Learning the Linux Kernel – System Calls Info ❓ How can user applications safely and stably access underlying hardware and system resources in a multitasking and virtual memory operating system while preventing illegal operations? Main Idea By introducing system calls as the only <span>legitimate intermediary</span> between user processes and the kernel, we can abstract hardware, … Read more