summaryrefslogtreecommitdiff
path: root/mm/mincore.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-01-23 18:21:21 -0800
committerAlexei Starovoitov <ast@kernel.org>2024-01-24 16:21:02 -0800
commitf3dcee938f485cf403ba2acf1f1548afe637c904 (patch)
tree8bdb88a3455d9395770e6cca76eee597453bd33e /mm/mincore.c
parent05f9cdd55d61cf9c6283fd3dc0edc7cad09bd7fe (diff)
libbpf: Wire up token_fd into feature probing logic
Adjust feature probing callbacks to take into account optional token_fd. In unprivileged contexts, some feature detectors would fail to detect kernel support just because BPF program, BPF map, or BTF object can't be loaded due to privileged nature of those operations. So when BPF object is loaded with BPF token, this token should be used for feature probing. This patch is setting support for this scenario, but we don't yet pass non-zero token FD. This will be added in the next patch. We also switched BPF cookie detector from using kprobe program to tracepoint one, as tracepoint is somewhat less dangerous BPF program type and has higher likelihood of being allowed through BPF token in the future. This change has no effect on detection behavior. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20240124022127.2379740-25-andrii@kernel.org
Diffstat (limited to 'mm/mincore.c')
0 files changed, 0 insertions, 0 deletions