Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v6.18 30 lines 537 B view raw
1// SPDX-License-Identifier: GPL-2.0 2/* Copyright (c) 2025 Meta Platforms, Inc. and affiliates. */ 3 4#include <linux/bpf.h> 5#include <bpf/bpf_helpers.h> 6#include <bpf/bpf_tracing.h> 7 8int fentry_hit; 9int fexit_hit; 10int my_pid; 11 12SEC("fentry/cmdline_proc_show") 13int BPF_PROG(fentry_cmdline) 14{ 15 if (my_pid != (bpf_get_current_pid_tgid() >> 32)) 16 return 0; 17 18 fentry_hit = 1; 19 return 0; 20} 21 22SEC("fexit/cmdline_proc_show") 23int BPF_PROG(fexit_cmdline) 24{ 25 if (my_pid != (bpf_get_current_pid_tgid() >> 32)) 26 return 0; 27 28 fexit_hit = 1; 29 return 0; 30}