Skip to content

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, and PAN memory protections. Every out-of-tree kernel module is checked offline by gki-kcfi-ko-gate to enforce zero GOT (311/312) relocations and matching .gnu.linkonce.this_module sizing.
  • No Root or Anti-Detection Frameworks: Public UniOHOS and UniOHOS-Devices repositories 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 xhee on Xiaomi XRING O1), /dev/kvm hardware virtualization is honestly documented as Unsupported rather 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:

PhaseEnforcement StateEngineering Goal
Phase 1 (Stage 0 to Stage 3 Hardware Bring-up)Permissive=0 + full AVC collectionKeep 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 as perf_daemon and usb-udc-guard) avoid tight polling loops, reacting to kernel uevents, display power states, and l3_devfreq / thermal transitions on demand.
  • Deep Sleep (mem or s2idle): Target platforms use the SoC's native suspend state (mem deep sleep with syscore_ops on mobile SoCs like XRING O1, or s2idle where hardware supports it), paired with cgroup.freeze on idle background containers to target < 1% CPU combined daemon idle overhead.
  • Hardware Protection Recommendations:
    • OLED Panels: Ensure BRI=0 and 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.

Independent Open-Source Community (CC-BY-4.0). Not affiliated with Huawei, HiSilicon, OpenAtom Foundation, Xiaomi, Qualcomm, MediaTek, or Arm.