diff options
author | Chuyi Zhou <zhouchuyi@bytedance.com> | 2023-10-18 14:17:39 +0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-10-19 17:02:46 -0700 |
commit | 6da88306811b40a207c94c9da9faf07bdb20776e (patch) | |
tree | 810c25824382b03274431b9670f419b2650af7ae /kernel/bpf/task_iter.c | |
parent | 6bd5e167af2e9d1aa79e4a1a2598abcdc8fafd59 (diff) |
cgroup: Prepare for using css_task_iter_*() in BPF
This patch makes some preparations for using css_task_iter_*() in BPF
Program.
1. Flags CSS_TASK_ITER_* are #define-s and it's not easy for bpf prog to
use them. Convert them to enum so bpf prog can take them from vmlinux.h.
2. In the next patch we will add css_task_iter_*() in common kfuncs which
is not safe. Since css_task_iter_*() does spin_unlock_irq() which might
screw up irq flags depending on the context where bpf prog is running.
So we should use irqsave/irqrestore here and the switching is harmless.
Suggested-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Chuyi Zhou <zhouchuyi@bytedance.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20231018061746.111364-2-zhouchuyi@bytedance.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/task_iter.c')
0 files changed, 0 insertions, 0 deletions