[PATCH v6 1/2] security: Expand task_setscheduler LSM hook
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Nov 19 04:22:23 UTC 2026
> At present, the task_setscheduler LSM hook only accepts the target
> task_struct pointer. It lacks visibility into the requested scheduling
> attributes (sched_attr) and the CPU affinity or cpuset mask (cpumask).
> Consequently, security modules cannot inspect the target scheduling
> parameters or CPU mask passed through the hook.
>
> For CPU affinity requests via sched_setaffinity(), auditing or
> filtering the raw mask requested by userspace requires inspecting the
> mask before __sched_setaffinity() intersects it with the task's allowed
> cpuset CPUs. Seccomp filters cannot perform this inspection because the
> affinity mask and scheduling attribute structures are passed behind
> user pointers, and scheduler tracepoints only observe the effective
> mask after intersection with the cpuset configuration.
>
> This patch expands the security_task_setscheduler() hook signature to
> [ ... ]
> mediation of explicit scheduling policy and parameter updates,
> sched_setaffinity() requests, and cpuset task migrations.
>
> Reviewed-by: Casey Schaufler <casey at schaufler-ca.com> # Smack
> Signed-off-by: Aaron Tomlin <atomlin at atomlin.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261119040705.684987-1-atomlin@atomlin.com?part=1
More information about the Linux-security-module-archive
mailing list