[PATCH v6 2/2] selftests/bpf: Verify task_setscheduler LSM hook parameters

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Nov 19 04:13:55 UTC 2026


> Extend the BPF LSM selftest to attach to the task_setscheduler hook and
> exercise scheduling policy updates via sched_setscheduler(), parameter
> updates via sched_setparam() and sched_setattr() with
> SCHED_FLAG_KEEP_POLICY, CPU affinity changes via sched_setaffinity(),
> and child timer slack updates via /proc/[pid]/timerslack_ns. Verify that
> the hook observes the expected sched_attr and cpumask arguments across
> each path, including the resolved scheduling policy and effective
> SCHED_FLAG_RESET_ON_FORK state for parameter-only updates as well as
> NULL pointers when an argument does not apply, and that returning -EPERM
> denies each operation.
> 
> Also add verifier test cases confirming that dereferencing the nullable
> attr or in_mask parameters without an explicit NULL check is rejected by
> the BPF verifier.
> 
> 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=2




More information about the Linux-security-module-archive mailing list