Skip to content
Commit c501bf55 authored by Tejun Heo's avatar Tejun Heo Committed by Alexei Starovoitov
Browse files

bpf: Make bpf_get_current_[ancestor_]cgroup_id() available for all program types



These helpers are safe to call from any context and there's no reason to
restrict access to them. Remove them from bpf_trace and filter lists and add
to bpf_base_func_proto() under perfmon_capable().

v2: After consulting with Andrii, relocated in bpf_base_func_proto() so that
    they require bpf_capable() but not perfomon_capable() as it doesn't read
    from or affect others on the system.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/ZAD8QyoszMZiTzBY@slm.duckdns.org


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent cacad346
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment