Security Model, SELinux & Standby Power Architecture
UniOHOS treats platform security and standby power efficiency as core architectural constraints rather than afterthoughts.
1. Kernel Hardening & Zero Root / Stealth Policy
- Hardware & Kernel Protections Preserved: Official UniOHOS branches retain ARM64
KCFI,PAC/BTI, andPANmemory protections. Every out-of-tree kernel module is checked offline bygki-kcfi-ko-gateto enforce zero GOT (311/312) relocations and matching.gnu.linkonce.this_modulesizing. - No Root or Anti-Detection Frameworks: Public
UniOHOSandUniOHOS-Devicesrepositories do not include kernel root frameworks, mount-hiding patches, or attestation-spoofing mechanisms. - EL2 Hypervisor Boundaries: On retail devices where an OEM EL2 hypervisor occupies EL2 (for example
xheeon XiaomiXRING O1),/dev/kvmhardware virtualization is honestly documented asUnsupportedrather than bypassed.
2. Two-Phase SELinux Enforcement Roadmap
Transitioning a complex multi-subsystem port to SELinux Enforcing=1 without silent policy blind spots follows a disciplined two-phase flow:
| Phase | Enforcement State | Engineering Goal |
|---|---|---|
| Phase 1 (Stage 0 to Stage 3 Hardware Bring-up) | Permissive=0 + full AVC collection | Keep neverallow == 0 across every incremental .cil delta; collect complete kernel AVC and hilog audit logs across all subsystems (eliminating dontaudit blind spots before lock-down). |
| Phase 2 (Stage 4 Daily-Driver Hardening) | Day-0 Enforcing=1 (or atomic switch via enforcing-boot-guard) | Lock SELinux into Enforcing=1 from early boot (t=0.0s) with verified /data xattr security contexts (el1/bundle), neverallow == 0, and zero unresolved AVC denials on clean cold boot. |
3. Hardware Fail-Closed Guarantee
Security-sensitive hardware interfaces enforce strict Fail-Closed semantics:
- Biometrics (
UserAuth/ Ultrasonic Fingerprint): If the hardware sensor or TEE verification channel is unavailable, authentication fails cleanly. No software fallback or synthetic pass token is ever returned. - Keystore (
HUKS) & NFC/eSE: Hardware-backed key operations and secure element transactions propagate errors explicitly when the underlying TEE or eSE path cannot be verified.
4. Event-Driven Power Management & Deep Sleep
- Event-Driven Daemons (
epoll/netlink/uevent): Custom platform daemons (such asperf_daemonandusb-udc-guard) avoid tight polling loops, reacting to kernel uevents, display power states, andl3_devfreq/ thermal transitions on demand. - Deep Sleep (
memors2idle): Target platforms use the SoC's native suspend state (memdeep sleep withsyscore_opson mobile SoCs likeXRING O1, ors2idlewhere hardware supports it), paired withcgroup.freezeon idle background containers to target< 1% CPUcombined daemon idle overhead. - Hardware Protection Recommendations:
- OLED Panels: Ensure
BRI=0and panel power-off during unattended screen-off test runs to prevent burn-in. - Battery Longevity: Enable thermal current limits or
80%charge bypass (where supported by the fuel gauge/charger) during extended bench or CI soak tests.
- OLED Panels: Ensure