Constrain cgroups access.
What changed: - Removed cgroup access from untrusted and priv apps. - Settings app writes to /dev/stune/foreground/tasks, so system_app domain retains access to cgroup. - libcutils exports API to /dev/{cpuset, stune}/*. This API seems to be used abundantly in native code. So added a blanket allow rule for (coredomain - apps) to access cgroups. - For now, only audit cgroup access from vendor domains. Ultimately, we want to either constrain vendor access to individual domains or, even better, remove vendor access and have platform manage cgroups exclusively. Changes from original aosp/692189 which was reverted: - There seem to be spurious denials from vendor-specific apps. So added back access from { appdomain -all_untrusted_apps -priv_app } to cgroup. Audit this access with intent to write explicit per-domain rules for it. Bug: 110043362 Test: adb shell setprop ro.config.per_app_memcg true, device correctly populates /dev/memcg on a per app basis on a device that supports that. Test: aosp_sailfish, wahoo boot without cgroup denials This reverts commit cacea25e. Change-Id: I05ab404f348a864e8409d811346c8a0bf49bc47a
Showing
- private/app_neverallows.te 3 additions, 0 deletionsprivate/app_neverallows.te
- private/priv_app.te 3 additions, 0 deletionsprivate/priv_app.te
- private/system_app.te 3 additions, 0 deletionsprivate/system_app.te
- public/app.te 0 additions, 4 deletionspublic/app.te
- public/domain.te 28 additions, 3 deletionspublic/domain.te
- public/init.te 1 addition, 1 deletionpublic/init.te
- public/vendor_init.te 1 addition, 0 deletionspublic/vendor_init.te
Please register or sign in to comment