aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf/task_iter.c
diff options
context:
space:
mode:
authorYonghong Song <yonghong.song@linux.dev>2023-08-27 08:28:11 -0700
committerAlexei Starovoitov <ast@kernel.org>2023-09-08 08:42:18 -0700
commit6adf82a4398d774398b4538dad561958c2c9521e (patch)
treef94db8a13ea660ba284fb176cbd09cebfc460791 /kernel/bpf/task_iter.c
parentselftests/bpf: Add bpf_percpu_obj_{new,drop}() macro in bpf_experimental.h (diff)
downloadlinux-rng-6adf82a4398d774398b4538dad561958c2c9521e.tar.xz
linux-rng-6adf82a4398d774398b4538dad561958c2c9521e.zip
selftests/bpf: Add tests for array map with local percpu kptr
Add non-sleepable and sleepable tests with percpu kptr. For non-sleepable test, four programs are executed in the order of: 1. allocate percpu data. 2. assign values to percpu data. 3. retrieve percpu data. 4. de-allocate percpu data. The sleepable prog tried to exercise all above 4 steps in a single prog. Also for sleepable prog, rcu_read_lock is needed to protect direct percpu ptr access (from map value) and following bpf_this_cpu_ptr() and bpf_per_cpu_ptr() helpers. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20230827152811.2000125-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/task_iter.c')
0 files changed, 0 insertions, 0 deletions