diff options
| author | Cheng-Yang Chou <yphbchou0911@gmail.com> | 2026-11-23 22:54:51 +0800 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-11-24 04:20:50 -1000 |
| commit | e667a652dd0a6f6d0d89e2d0f80881ddabea1ead (patch) | |
| tree | 82c28f1a740e929047eae2d1181a59fa0debd7ce /kernel/locking | |
| parent | 1b28ee399b23c455211e0b654da3017b8edd119e (diff) | |
sched_ext: Don't request private stacks the JIT can't provide
Since commit 4f8b122848db ("sched_ext: Add basic building blocks for
nested sub-scheduler dispatching"), bpf_scx_check_member() requests a
private stack for ops.dispatch(), and later also for ops.sub_caps_updated(),
whenever CONFIG_EXT_SUB_SCHED is set, which is the default.
The verifier fails the load with -EACCES if the JIT doesn't support
private stacks, so on architectures whose JIT doesn't, like riscv64,
no BPF scheduler that implements ops.dispatch() can be loaded.
The private stack is only needed when these operations nest, which only
happens with sub-schedulers. Don't request it if the JIT can't provide
it, and refuse to attach sub-schedulers in that case. Root schedulers
then load as they did before sub-scheduler support was added.
Fixes: 4f8b122848db ("sched_ext: Add basic building blocks for nested sub-scheduler dispatching")
Cc: stable@vger.kernel.org # v7.1+
Reported-by: JaeJoon Jung <rgbi3307@gmail.com>
Link: https://lore.kernel.org/all/20260810031418.95364-1-rgbi3307@gmail.com/
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
[tj: Wrapped the switch in an if block instead of returning early.]
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/locking')
0 files changed, 0 insertions, 0 deletions
