ANDROID: sched/debug: Make Energy Model read-only

The energy model is exposed through the sched_domain entry in
/proc/sys/kernel. This option only appears when SCHED_DEBUG is
enabled, and is only writeable by the owner (root).

Various userspace tools may read the energy model, including
LISA (which uses it to brute-force calculate optimal energy
placement for synthetic tasks), but none change it.

Since there is no known use case for changing the energy model,
change these procfs nodes to be read-only instead. This removes
the need to add validation for values written into these files.

Bug: 118694140
Change-Id: Ie997b5c4c9e751b21cc94d82b2b8b99640c524fa
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
1 file changed