Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 990194fe authored by Bart Van Assche's avatar Bart Van Assche
Browse files

Fix cgroup directory permissions

Cgroup attributes are set from three different contexts:
(1) From the process that creates the cgroup directories. These
    processes are /system/bin/init, zygote and zygote64.
(2) From the created process. Some but not all created processes have
    user ID and/or group ID 'system'.
(3) The system_server process modifies certain cgroup attributes from
    other processes.

Allow all processes from the system group, including system_server, to
modify cgroup attributes from other processes. As one can see in
init.rc, that file includes commands for granting the system group
write permission for blkcg attributes. See also
https://cs.android.com/android/platform/superproject/+/master:system/core/rootdir/init.rc



Bug: 213617178
Test: Verified in the Cuttlefish emulator that this patch makes the
Test: io.bfq.weight write errors disappear from logcat.
Change-Id: Idbfb49c25afec12b21daea7a17db5322bc981ff0
Signed-off-by: default avatarBart Van Assche <bvanassche@google.com>
parent f508ede7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
    {
      "Controller": "blkio",
      "Path": "/dev/blkio",
      "Mode": "0755",
      "Mode": "0775",
      "UID": "system",
      "GID": "system"
    },
@@ -32,7 +32,7 @@
  ],
  "Cgroups2": {
    "Path": "/sys/fs/cgroup",
    "Mode": "0755",
    "Mode": "0775",
    "UID": "system",
    "GID": "system",
    "Controllers": [