aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/bpf.h3
-rw-r--r--include/uapi/linux/bpf.h19
2 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 2235aee8096a..1b9a3f5b27f6 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -188,5 +188,8 @@ extern const struct bpf_func_proto bpf_get_prandom_u32_proto;
188extern const struct bpf_func_proto bpf_get_smp_processor_id_proto; 188extern const struct bpf_func_proto bpf_get_smp_processor_id_proto;
189extern const struct bpf_func_proto bpf_tail_call_proto; 189extern const struct bpf_func_proto bpf_tail_call_proto;
190extern const struct bpf_func_proto bpf_ktime_get_ns_proto; 190extern const struct bpf_func_proto bpf_ktime_get_ns_proto;
191extern const struct bpf_func_proto bpf_get_current_pid_tgid_proto;
192extern const struct bpf_func_proto bpf_get_current_uid_gid_proto;
193extern const struct bpf_func_proto bpf_get_current_comm_proto;
191 194
192#endif /* _LINUX_BPF_H */ 195#endif /* _LINUX_BPF_H */
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 602f05b7a275..29ef6f99e43d 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -230,6 +230,25 @@ enum bpf_func_id {
230 * Return: 0 on success 230 * Return: 0 on success
231 */ 231 */
232 BPF_FUNC_clone_redirect, 232 BPF_FUNC_clone_redirect,
233
234 /**
235 * u64 bpf_get_current_pid_tgid(void)
236 * Return: current->tgid << 32 | current->pid
237 */
238 BPF_FUNC_get_current_pid_tgid,
239
240 /**
241 * u64 bpf_get_current_uid_gid(void)
242 * Return: current_gid << 32 | current_uid
243 */
244 BPF_FUNC_get_current_uid_gid,
245
246 /**
247 * bpf_get_current_comm(char *buf, int size_of_buf)
248 * stores current->comm into buf
249 * Return: 0 on success
250 */
251 BPF_FUNC_get_current_comm,
233 __BPF_FUNC_MAX_ID, 252 __BPF_FUNC_MAX_ID,
234}; 253};
235 254