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. 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 Change-Id: I9e441b26792f1edb1663c660bcff422ec7a6332b
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 11 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