Tag

Kernel

0 views collected around this technical thread.

OPPO Kernel Craftsman
OPPO Kernel Craftsman
Aug 18, 2023 · Information Security

Shadow Call Stack (SCS) in Android: Mechanism, Requirements, and Implementation

Android’s Shadow Call Stack (SCS), silently enabled since Android R on AArch64 devices, stores return addresses in a protected register‑based stack separate from the regular stack, complementing stack canaries and requiring hardware support, while developers can activate it via -fsanitize=shadow-call-stack and avoid using X18 elsewhere.

Aarch64Android securityKernel
0 likes · 7 min read
Shadow Call Stack (SCS) in Android: Mechanism, Requirements, and Implementation
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Dec 23, 2022 · Mobile Development

Android Power Management: Power States, WakeLock, and Suspend/Resume Mechanisms

The article explains Android’s power management architecture, detailing kernel power states, CPU and device idle modes, the multi‑layer framework, WakeLock types and flags, and the early‑suspend/late‑resume mechanisms, while providing commands and examples for monitoring and controlling device sleep behavior.

Doze modeIdle StateKernel
0 likes · 11 min read
Android Power Management: Power States, WakeLock, and Suspend/Resume Mechanisms
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Dec 2, 2022 · Information Security

Understanding ARM TrustZone TEE and SMC Calls: Architecture, Conventions, and Implementation

The article explains how ARM TrustZone creates a Secure World Trusted Execution Environment, details the REE‑to‑TEE interaction via Secure Monitor Calls, outlines AArch32/AArch64 register conventions, fast versus yielding SMCs, service registration, and the low‑level boot and handling flow of the Secure Monitor.

ARMKernelSMC
0 likes · 14 min read
Understanding ARM TrustZone TEE and SMC Calls: Architecture, Conventions, and Implementation
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Nov 11, 2022 · Operations

Linux Real-Time Thread CPU Selection Process

The article details Linux’s real‑time thread CPU‑selection process, explaining how priorities (0‑99 for rt, 100‑139 for CFS) set the sched_class, how functions like select_task_rq_rt, find_lowest_rq, cpupri_find_fitness and __cpupri_find build a candidate CPU mask, and how the final CPU is chosen by previous affinity, domain order, wake‑up CPU or random selection, while warning that excessive rt tasks can increase power use and cause scheduling delays.

CPU SelectionKernelLinux
0 likes · 10 min read
Linux Real-Time Thread CPU Selection Process
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Feb 11, 2022 · Operations

Overview and Implementation of eBPF for Android Network Statistics and Control

The article explains how Android’s shift to Linux kernel 4.x/5.x introduced the eBPF framework, detailing its advantages over iptables, the programming model with helper macros and maps, and its implementation in netd and HAL to collect network statistics, enforce traffic control, and support power‑saving Doze policies.

Kernelandroidbpf
0 likes · 8 min read
Overview and Implementation of eBPF for Android Network Statistics and Control
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Jan 7, 2022 · Mobile Development

Device Tree Compilation, Partitioning, and Runtime Matching Process in Android

The article explains Android’s Device Tree workflow, detailing how DTS files are compiled into DTB blobs and, since Android 8, split into platform DTB and vendor DTBO partitions, how GKI moves DTB to vendor_boot, and how bootloaders and runtime stages match DTBs/DTBOs using platform IDs, GPIO cues, and overlay mechanisms.

BootloaderDTBDTC
0 likes · 8 min read
Device Tree Compilation, Partitioning, and Runtime Matching Process in Android
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Jul 2, 2021 · Mobile Development

Understanding the Android Power Supply Subsystem and healthd Daemon

The article explains how Android’s Linux power‑supply subsystem abstracts battery and charger status via sysfs nodes, how drivers register properties and trigger uevents, and how the healthd daemon listens to those events, parses attributes, and forwards detailed power information to user space.

Device DriversHealthdKernel
0 likes · 9 min read
Understanding the Android Power Supply Subsystem and healthd Daemon
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Jun 4, 2021 · Information Security

Overview of SELinux and Its Use in Android

The article explains SELinux’s origins, core architecture, mandatory access control mechanisms such as type enforcement and MLS, and how Android incorporates SELinux as SEAndroid—detailing its evolution from permissive to enforcing mode, policy file structure, Android O’s split policies, and example domain and object transitions.

Access ControlKernelMAC
0 likes · 17 min read
Overview of SELinux and Its Use in Android
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Apr 23, 2021 · Operations

Linux Thermal Framework: Architecture, Thermal Zones, Cooling Devices, and Governors

The Linux Thermal Framework provides a three‑layer architecture—userspace sysfs interfaces, kernel core components, and hardware sensors—to define thermal zones and cooling devices, employing governors such as bang‑bang, step‑wise, low‑limits, user‑space, and power‑allocator to balance performance, power consumption, and device temperature, especially on mobile platforms.

Cooling DevicesKernelLinux
0 likes · 8 min read
Linux Thermal Framework: Architecture, Thermal Zones, Cooling Devices, and Governors
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Mar 20, 2020 · Operations

Understanding the Linux Block Layer: Multi‑Queue Architecture and I/O Schedulers

The Linux block layer, positioned between the VFS and device drivers, evolved from a single‑queue design to a multi‑queue architecture (kernel 3.13 onward) to reduce lock contention and exploit modern hardware queues, managing bio/request lifecycles, dispatching through layered queues, and employing various I/O schedulers for balanced throughput and latency.

Block LayerI/O schedulerKernel
0 likes · 15 min read
Understanding the Linux Block Layer: Multi‑Queue Architecture and I/O Schedulers