bpf.h (cdd38c5f1ce4398ec58fec95904b75824daab7b5) bpf.h (a10787e6d58c24b51e91c19c6d16c5da89fcaa4b)
1/* SPDX-License-Identifier: GPL-2.0-only */
2/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
3 */
4#ifndef _LINUX_BPF_H
5#define _LINUX_BPF_H 1
6
7#include <uapi/linux/bpf.h>
8

--- 1485 unchanged lines hidden (view full) ---

1494 struct bpf_reg_state *reg);
1495int btf_check_type_match(struct bpf_verifier_log *log, const struct bpf_prog *prog,
1496 struct btf *btf, const struct btf_type *t);
1497
1498struct bpf_prog *bpf_prog_by_id(u32 id);
1499struct bpf_link *bpf_link_by_id(u32 id);
1500
1501const struct bpf_func_proto *bpf_base_func_proto(enum bpf_func_id func_id);
1/* SPDX-License-Identifier: GPL-2.0-only */
2/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
3 */
4#ifndef _LINUX_BPF_H
5#define _LINUX_BPF_H 1
6
7#include <uapi/linux/bpf.h>
8

--- 1485 unchanged lines hidden (view full) ---

1494 struct bpf_reg_state *reg);
1495int btf_check_type_match(struct bpf_verifier_log *log, const struct bpf_prog *prog,
1496 struct btf *btf, const struct btf_type *t);
1497
1498struct bpf_prog *bpf_prog_by_id(u32 id);
1499struct bpf_link *bpf_link_by_id(u32 id);
1500
1501const struct bpf_func_proto *bpf_base_func_proto(enum bpf_func_id func_id);
1502void bpf_task_storage_free(struct task_struct *task);
1502#else /* !CONFIG_BPF_SYSCALL */
1503static inline struct bpf_prog *bpf_prog_get(u32 ufd)
1504{
1505 return ERR_PTR(-EOPNOTSUPP);
1506}
1507
1508static inline struct bpf_prog *bpf_prog_get_type_dev(u32 ufd,
1509 enum bpf_prog_type type,

--- 169 unchanged lines hidden (view full) ---

1679 return ERR_PTR(-ENOTSUPP);
1680}
1681
1682static inline const struct bpf_func_proto *
1683bpf_base_func_proto(enum bpf_func_id func_id)
1684{
1685 return NULL;
1686}
1503#else /* !CONFIG_BPF_SYSCALL */
1504static inline struct bpf_prog *bpf_prog_get(u32 ufd)
1505{
1506 return ERR_PTR(-EOPNOTSUPP);
1507}
1508
1509static inline struct bpf_prog *bpf_prog_get_type_dev(u32 ufd,
1510 enum bpf_prog_type type,

--- 169 unchanged lines hidden (view full) ---

1680 return ERR_PTR(-ENOTSUPP);
1681}
1682
1683static inline const struct bpf_func_proto *
1684bpf_base_func_proto(enum bpf_func_id func_id)
1685{
1686 return NULL;
1687}
1688
1689static inline void bpf_task_storage_free(struct task_struct *task)
1690{
1691}
1687#endif /* CONFIG_BPF_SYSCALL */
1688
1689void __bpf_free_used_btfs(struct bpf_prog_aux *aux,
1690 struct btf_mod_pair *used_btfs, u32 len);
1691
1692static inline struct bpf_prog *bpf_prog_get_type(u32 ufd,
1693 enum bpf_prog_type type)
1694{

--- 186 unchanged lines hidden (view full) ---

1881extern const struct bpf_func_proto bpf_skc_to_udp6_sock_proto;
1882extern const struct bpf_func_proto bpf_copy_from_user_proto;
1883extern const struct bpf_func_proto bpf_snprintf_btf_proto;
1884extern const struct bpf_func_proto bpf_per_cpu_ptr_proto;
1885extern const struct bpf_func_proto bpf_this_cpu_ptr_proto;
1886extern const struct bpf_func_proto bpf_ktime_get_coarse_ns_proto;
1887extern const struct bpf_func_proto bpf_sock_from_file_proto;
1888extern const struct bpf_func_proto bpf_get_socket_ptr_cookie_proto;
1692#endif /* CONFIG_BPF_SYSCALL */
1693
1694void __bpf_free_used_btfs(struct bpf_prog_aux *aux,
1695 struct btf_mod_pair *used_btfs, u32 len);
1696
1697static inline struct bpf_prog *bpf_prog_get_type(u32 ufd,
1698 enum bpf_prog_type type)
1699{

--- 186 unchanged lines hidden (view full) ---

1886extern const struct bpf_func_proto bpf_skc_to_udp6_sock_proto;
1887extern const struct bpf_func_proto bpf_copy_from_user_proto;
1888extern const struct bpf_func_proto bpf_snprintf_btf_proto;
1889extern const struct bpf_func_proto bpf_per_cpu_ptr_proto;
1890extern const struct bpf_func_proto bpf_this_cpu_ptr_proto;
1891extern const struct bpf_func_proto bpf_ktime_get_coarse_ns_proto;
1892extern const struct bpf_func_proto bpf_sock_from_file_proto;
1893extern const struct bpf_func_proto bpf_get_socket_ptr_cookie_proto;
1894extern const struct bpf_func_proto bpf_task_storage_get_proto;
1895extern const struct bpf_func_proto bpf_task_storage_delete_proto;
1889
1890const struct bpf_func_proto *bpf_tracing_func_proto(
1891 enum bpf_func_id func_id, const struct bpf_prog *prog);
1892
1893const struct bpf_func_proto *tracing_prog_func_proto(
1894 enum bpf_func_id func_id, const struct bpf_prog *prog);
1895
1896/* Shared helpers among cBPF and eBPF. */

--- 110 unchanged lines hidden ---
1896
1897const struct bpf_func_proto *bpf_tracing_func_proto(
1898 enum bpf_func_id func_id, const struct bpf_prog *prog);
1899
1900const struct bpf_func_proto *tracing_prog_func_proto(
1901 enum bpf_func_id func_id, const struct bpf_prog *prog);
1902
1903/* Shared helpers among cBPF and eBPF. */

--- 110 unchanged lines hidden ---