~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/bpf/bpf_kfuncs.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __BPF_KFUNCS__
  2 #define __BPF_KFUNCS__
  3 
  4 struct bpf_sock_addr_kern;
  5 
  6 /* Description
  7  *  Initializes an skb-type dynptr
  8  * Returns
  9  *  Error code
 10  */
 11 extern int bpf_dynptr_from_skb(struct __sk_buff *skb, __u64 flags,
 12     struct bpf_dynptr *ptr__uninit) __ksym __weak;
 13 
 14 /* Description
 15  *  Initializes an xdp-type dynptr
 16  * Returns
 17  *  Error code
 18  */
 19 extern int bpf_dynptr_from_xdp(struct xdp_md *xdp, __u64 flags,
 20                                struct bpf_dynptr *ptr__uninit) __ksym __weak;
 21 
 22 /* Description
 23  *  Obtain a read-only pointer to the dynptr's data
 24  * Returns
 25  *  Either a direct pointer to the dynptr data or a pointer to the user-provided
 26  *  buffer if unable to obtain a direct pointer
 27  */
 28 extern void *bpf_dynptr_slice(const struct bpf_dynptr *ptr, __u32 offset,
 29                               void *buffer, __u32 buffer__szk) __ksym __weak;
 30 
 31 /* Description
 32  *  Obtain a read-write pointer to the dynptr's data
 33  * Returns
 34  *  Either a direct pointer to the dynptr data or a pointer to the user-provided
 35  *  buffer if unable to obtain a direct pointer
 36  */
 37 extern void *bpf_dynptr_slice_rdwr(const struct bpf_dynptr *ptr, __u32 offset,
 38                               void *buffer, __u32 buffer__szk) __ksym __weak;
 39 
 40 extern int bpf_dynptr_adjust(const struct bpf_dynptr *ptr, __u32 start, __u32 end) __ksym __weak;
 41 extern bool bpf_dynptr_is_null(const struct bpf_dynptr *ptr) __ksym __weak;
 42 extern bool bpf_dynptr_is_rdonly(const struct bpf_dynptr *ptr) __ksym __weak;
 43 extern __u32 bpf_dynptr_size(const struct bpf_dynptr *ptr) __ksym __weak;
 44 extern int bpf_dynptr_clone(const struct bpf_dynptr *ptr, struct bpf_dynptr *clone__init) __ksym __weak;
 45 
 46 /* Description
 47  *  Modify the address of a AF_UNIX sockaddr.
 48  * Returns__bpf_kfunc
 49  *  -EINVAL if the address size is too big or, 0 if the sockaddr was successfully modified.
 50  */
 51 extern int bpf_sock_addr_set_sun_path(struct bpf_sock_addr_kern *sa_kern,
 52                                       const __u8 *sun_path, __u32 sun_path__sz) __ksym;
 53 
 54 /* Description
 55  *  Allocate and configure a reqsk and link it with a listener and skb.
 56  * Returns
 57  *  Error code
 58  */
 59 struct sock;
 60 struct bpf_tcp_req_attrs;
 61 extern int bpf_sk_assign_tcp_reqsk(struct __sk_buff *skb, struct sock *sk,
 62                                    struct bpf_tcp_req_attrs *attrs, int attrs__sz) __ksym;
 63 
 64 void *bpf_cast_to_kern_ctx(void *) __ksym;
 65 
 66 extern void *bpf_rdonly_cast(const void *obj, __u32 btf_id) __ksym __weak;
 67 
 68 extern int bpf_get_file_xattr(struct file *file, const char *name,
 69                               struct bpf_dynptr *value_ptr) __ksym;
 70 extern int bpf_get_fsverity_digest(struct file *file, struct bpf_dynptr *digest_ptr) __ksym;
 71 
 72 extern struct bpf_key *bpf_lookup_user_key(__u32 serial, __u64 flags) __ksym;
 73 extern struct bpf_key *bpf_lookup_system_key(__u64 id) __ksym;
 74 extern void bpf_key_put(struct bpf_key *key) __ksym;
 75 extern int bpf_verify_pkcs7_signature(struct bpf_dynptr *data_ptr,
 76                                       struct bpf_dynptr *sig_ptr,
 77                                       struct bpf_key *trusted_keyring) __ksym;
 78 
 79 extern bool bpf_session_is_return(void) __ksym __weak;
 80 extern __u64 *bpf_session_cookie(void) __ksym __weak;
 81 #endif
 82 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php