Repository navigation
Two more kernels for the moto g(50) 5G (saipan, XT2149-1, MediaTek MT6833 / Dimensity 700), built for Droidspaces.
This release is about cgroups. The v1.0.0 pair kept the container on cgroup v1, and on this device that means the container has no cgroup isolation at all: its systemd writes /init.scope and /system.slice/* at the host hierarchy root, next to Android's own cgroups, so there is no single cgroup covering it and nothing can bound it. These images put the container on cgroup v2, where it gets a subtree of its own.
| file | size | md5 | what it is |
|---|---|---|---|
boot-saipan-ksu-cgroupv2-mem.img |
28,551,168 | f5e522848d0432f7eac3f728691dc21e |
recommended - cgroup v2, with cgroup_no_v1=memory on the cmdline. What runs on my handset |
boot-saipan-ksu-noprefix.img |
28,551,168 | 6b1bccb22fe169b5ecee08693239f213 |
identical kernel, stock cmdline - memory stays on v1. The fallback |
Both reuse the stock Motorola ramdisk and DTB unchanged, and both are smaller than the 41,943,040-byte boot partition. Flash with fastboot flash boot <file>; the boot partition is the only thing touched. Both also carry the mtk_cpufreq.level= DVFS override from v1.0.0, which does nothing unless the cmdline asks for it.
What changed since v1.0.0
The cgroup v2 device-controller backport. BPF_CGROUP_DEVICE plus the plumbing runc needs on a cgroup v2 host - the whole BPF_PROG_QUERY command, check_return_code() and the bpf_prog_array helpers. 342 lines across 12 files, ported from upstream 4.15. This is what makes --force-cgroupv1 unnecessary: runc attaches a device program and bpf_prog_query() reports it.
Droidspaces' 02.fix_restore cgroup file prefix handling patch. Android mounts the v1 cpuset hierarchy with noprefix, so /dev/cpuset exposed cpus and mems but not cpuset.cpus / cpuset.mems at all. Now both spellings exist, and cpuset.cpus reads 0-7 inside the container.
The container moves to cgroup v2, which is what actually buys the isolation described above.
Verified on hardware
vendor modules 17 of 17 load - Wi-Fi, Bluetooth, touch, fingerprint, GPS, FM, sensors
root KernelSU-Next, su -c id -> uid=0 context=u:r:ksu:s0
SELinux Enforcing
Droidspaces v6.5.5, Debian 13 trixie, systemd PID 1
cgroup container on cgroup v2, force_cgroupv1=0
cgroup isolation 25 of 25 container processes under /sys/fs/cgroup/droidspaces/bagda
Docker in container Engine 29.8.1, overlay2, systemd cgroup driver, hello-world rc=0
BPF_CGROUP_DEVICE attached by runc: prog_cnt=1, attach_flags=0x2 (BPF_F_ALLOW_MULTI)
release string 4.14.186+ - byte-identical to the stock vermagic
The memory cap was tested live rather than assumed: with the container capped at 256 MB, a workload inside it was killed by the kernel (Memory cgroup out of memory: Kill process 16592 (python3) score 613) and the container carried on untouched.
If you use the recommended image
- Set
memory_limit=if you want a cap. Droidspaces delegates+memoryto the container cgroup and writesmemory.max. Note that a memory-only cap loses to zram here - measured, a 192 MB allocation was absorbed under a 64 MBmemory.maxbecausememory.swap.currentreached 129 MB - soextras/container-memguardsetsmemory.maxandmemory.swap.maxand keepsoom_score_adjat a killable value. It is optional. - If you move a container to v2, drop
"cgroup-parent"fromdaemon.json. On v2 Docker selects the systemd cgroup driver and dockerd refuses to start entirely:cgroup-parent for systemd cgroup should be a valid slice named as "xxx.slice". It is unnecessary there anyway. - Still needs
--privileged=noseccompand the systemd drop-in replacingdockerd -H fd://with-H unix:///var/run/docker.sock.
Known gap
CONFIG_ARM64_ERRATUM_1188873 and CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY are set in the stock config, but do not exist anywhere in the published Motorola source branch - zero hits across every Kconfig, Makefile, .c and .h, and olddefconfig on the untouched stock config drops both. The stock binary carries the ARM erratum 1188873 and Spectre-BHB strings; every kernel built from that branch carries neither. Restoring them means porting through arch/arm64/kernel/entry.S, which is documented in docs/KERNEL-NOTES.md §9 rather than quietly dropped.