Hello, On Thu, Jan 16, 2025 at 07:41:11PM +0000, Juntong Deng wrote: ... > +static int bpf_scx_bpf_capabilities_adjust(unsigned long *bpf_capabilities, > + u32 context_info, bool enter) > +{ > + if (enter) { > + switch (context_info) { > + case offsetof(struct sched_ext_ops, select_cpu): > + ENABLE_BPF_CAPABILITY(bpf_capabilities, BPF_CAP_SCX_KF_SELECT_CPU); > + ENABLE_BPF_CAPABILITY(bpf_capabilities, BPF_CAP_SCX_KF_ENQUEUE); > + break; ... > + } > + } else { > + switch (context_info) { > + case offsetof(struct sched_ext_ops, select_cpu): > + DISABLE_BPF_CAPABILITY(bpf_capabilities, BPF_CAP_SCX_KF_SELECT_CPU); > + DISABLE_BPF_CAPABILITY(bpf_capabilities, BPF_CAP_SCX_KF_ENQUEUE); > + break; ... > + } > + return 0; > +}