summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2023-04-01 19:07:21 +0300
committerAlexei Starovoitov <ast@kernel.org>2023-04-01 19:07:21 +0300
commita033907e7b34505ab281b6207750f55c98c69156 (patch)
tree62f3e2549846daec101886a9b5244428ff0aea3e /tools/perf/scripts/python
parent8585005823863230afe37e5794ecd992ffc5f34d (diff)
parentdb9d479ab59b21d719486e6bf673f83f129dae32 (diff)
downloadlinux-a033907e7b34505ab281b6207750f55c98c69156.tar.xz
Merge branch 'Enable RCU semantics for task kptrs'
David Vernet says: ==================== In commit 22df776a9a86 ("tasks: Extract rcu_users out of union"), the 'refcount_t rcu_users' field was extracted out of a union with the 'struct rcu_head rcu' field. This allows us to use the field for refcounting struct task_struct with RCU protection, as the RCU callback no longer flips rcu_users to be nonzero after the callback is scheduled. This patch set leverages this to do a few things: 1. Marks struct task_struct as RCU safe in the verifier, allowing referenced kptr tasks stored in maps to be accessed in an RCU read region without acquiring a reference (with just a NULL check). 2. Makes bpf_task_acquire() a KF_ACQUIRE | KF_RCU | KF_RET_NULL kfunc. 3. Removes bpf_task_kptr_get() and bpf_task_acquire_not_zero(), as they're now redundant with the above two changes. 4. Updates selftests and documentation accordingly. --- Changelog: v1: https://lore.kernel.org/all/20230331005733.406202-1-void@manifault.com/ v1 -> v2: - Remove testcases validating nested trust inheritance. The first version used 'struct task_struct __rcu *parent', but because that field has the __rcu tag it functions differently on gcc and llvm and causes gcc selftests to fail. Alexei is reworking nested trust, anyways so let's leave it off for now (Alexei). ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions