sched: process capabilities

A task group holds PR_CAP_RAWIO, PR_CAP_SPAWN and PR_CAP_ADMIN, inherits
them from its creator and can only drop them. Every build: the kernel and
init start with all three, so nothing changes until a task drops one.
CONFIG_SCHED_CAPABILITIES, off with DEFAULT_SMALL, lets a board short of
flash leave the checks out.

Signed-off-by: Royyan Zahir <royzah@gmail.com>
This commit is contained in:
Royyan Zahir 2026-10-02 06:56:34 +04:00 • committed by Alan C. Assis
parent fdf5ea919e
commit e70cd6bf45
6 changed files with 41 additions and 6 deletions

View file

@ -78,6 +78,13 @@
#define PR_SET_DUMPABLE 5
#define PR_GET_DUMPABLE 6
#define PR_CAPS_DROP 7
#define PR_CAPS_GET 8
#define PR_CAP_RAWIO (1 << 0)
#define PR_CAP_SPAWN (1 << 1)
#define PR_CAP_ADMIN (1 << 2)
#define PR_CAP_ALL (PR_CAP_RAWIO | PR_CAP_SPAWN | PR_CAP_ADMIN)
/****************************************************************************
* Public Type Definitions