cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

bpf_types.h (5706B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2/* internal file - do not include directly */
      3
      4#ifdef CONFIG_NET
      5BPF_PROG_TYPE(BPF_PROG_TYPE_SOCKET_FILTER, sk_filter,
      6	      struct __sk_buff, struct sk_buff)
      7BPF_PROG_TYPE(BPF_PROG_TYPE_SCHED_CLS, tc_cls_act,
      8	      struct __sk_buff, struct sk_buff)
      9BPF_PROG_TYPE(BPF_PROG_TYPE_SCHED_ACT, tc_cls_act,
     10	      struct __sk_buff, struct sk_buff)
     11BPF_PROG_TYPE(BPF_PROG_TYPE_XDP, xdp,
     12	      struct xdp_md, struct xdp_buff)
     13#ifdef CONFIG_CGROUP_BPF
     14BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_SKB, cg_skb,
     15	      struct __sk_buff, struct sk_buff)
     16BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_SOCK, cg_sock,
     17	      struct bpf_sock, struct sock)
     18BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_SOCK_ADDR, cg_sock_addr,
     19	      struct bpf_sock_addr, struct bpf_sock_addr_kern)
     20#endif
     21BPF_PROG_TYPE(BPF_PROG_TYPE_LWT_IN, lwt_in,
     22	      struct __sk_buff, struct sk_buff)
     23BPF_PROG_TYPE(BPF_PROG_TYPE_LWT_OUT, lwt_out,
     24	      struct __sk_buff, struct sk_buff)
     25BPF_PROG_TYPE(BPF_PROG_TYPE_LWT_XMIT, lwt_xmit,
     26	      struct __sk_buff, struct sk_buff)
     27BPF_PROG_TYPE(BPF_PROG_TYPE_LWT_SEG6LOCAL, lwt_seg6local,
     28	      struct __sk_buff, struct sk_buff)
     29BPF_PROG_TYPE(BPF_PROG_TYPE_SOCK_OPS, sock_ops,
     30	      struct bpf_sock_ops, struct bpf_sock_ops_kern)
     31BPF_PROG_TYPE(BPF_PROG_TYPE_SK_SKB, sk_skb,
     32	      struct __sk_buff, struct sk_buff)
     33BPF_PROG_TYPE(BPF_PROG_TYPE_SK_MSG, sk_msg,
     34	      struct sk_msg_md, struct sk_msg)
     35BPF_PROG_TYPE(BPF_PROG_TYPE_FLOW_DISSECTOR, flow_dissector,
     36	      struct __sk_buff, struct bpf_flow_dissector)
     37#endif
     38#ifdef CONFIG_BPF_EVENTS
     39BPF_PROG_TYPE(BPF_PROG_TYPE_KPROBE, kprobe,
     40	      bpf_user_pt_regs_t, struct pt_regs)
     41BPF_PROG_TYPE(BPF_PROG_TYPE_TRACEPOINT, tracepoint,
     42	      __u64, u64)
     43BPF_PROG_TYPE(BPF_PROG_TYPE_PERF_EVENT, perf_event,
     44	      struct bpf_perf_event_data, struct bpf_perf_event_data_kern)
     45BPF_PROG_TYPE(BPF_PROG_TYPE_RAW_TRACEPOINT, raw_tracepoint,
     46	      struct bpf_raw_tracepoint_args, u64)
     47BPF_PROG_TYPE(BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE, raw_tracepoint_writable,
     48	      struct bpf_raw_tracepoint_args, u64)
     49BPF_PROG_TYPE(BPF_PROG_TYPE_TRACING, tracing,
     50	      void *, void *)
     51#endif
     52#ifdef CONFIG_CGROUP_BPF
     53BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_DEVICE, cg_dev,
     54	      struct bpf_cgroup_dev_ctx, struct bpf_cgroup_dev_ctx)
     55BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_SYSCTL, cg_sysctl,
     56	      struct bpf_sysctl, struct bpf_sysctl_kern)
     57BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_SOCKOPT, cg_sockopt,
     58	      struct bpf_sockopt, struct bpf_sockopt_kern)
     59#endif
     60#ifdef CONFIG_BPF_LIRC_MODE2
     61BPF_PROG_TYPE(BPF_PROG_TYPE_LIRC_MODE2, lirc_mode2,
     62	      __u32, u32)
     63#endif
     64#ifdef CONFIG_INET
     65BPF_PROG_TYPE(BPF_PROG_TYPE_SK_REUSEPORT, sk_reuseport,
     66	      struct sk_reuseport_md, struct sk_reuseport_kern)
     67BPF_PROG_TYPE(BPF_PROG_TYPE_SK_LOOKUP, sk_lookup,
     68	      struct bpf_sk_lookup, struct bpf_sk_lookup_kern)
     69#endif
     70#if defined(CONFIG_BPF_JIT)
     71BPF_PROG_TYPE(BPF_PROG_TYPE_STRUCT_OPS, bpf_struct_ops,
     72	      void *, void *)
     73BPF_PROG_TYPE(BPF_PROG_TYPE_EXT, bpf_extension,
     74	      void *, void *)
     75#ifdef CONFIG_BPF_LSM
     76BPF_PROG_TYPE(BPF_PROG_TYPE_LSM, lsm,
     77	       void *, void *)
     78#endif /* CONFIG_BPF_LSM */
     79#endif
     80BPF_PROG_TYPE(BPF_PROG_TYPE_SYSCALL, bpf_syscall,
     81	      void *, void *)
     82
     83BPF_MAP_TYPE(BPF_MAP_TYPE_ARRAY, array_map_ops)
     84BPF_MAP_TYPE(BPF_MAP_TYPE_PERCPU_ARRAY, percpu_array_map_ops)
     85BPF_MAP_TYPE(BPF_MAP_TYPE_PROG_ARRAY, prog_array_map_ops)
     86BPF_MAP_TYPE(BPF_MAP_TYPE_PERF_EVENT_ARRAY, perf_event_array_map_ops)
     87#ifdef CONFIG_CGROUPS
     88BPF_MAP_TYPE(BPF_MAP_TYPE_CGROUP_ARRAY, cgroup_array_map_ops)
     89#endif
     90#ifdef CONFIG_CGROUP_BPF
     91BPF_MAP_TYPE(BPF_MAP_TYPE_CGROUP_STORAGE, cgroup_storage_map_ops)
     92BPF_MAP_TYPE(BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE, cgroup_storage_map_ops)
     93#endif
     94BPF_MAP_TYPE(BPF_MAP_TYPE_HASH, htab_map_ops)
     95BPF_MAP_TYPE(BPF_MAP_TYPE_PERCPU_HASH, htab_percpu_map_ops)
     96BPF_MAP_TYPE(BPF_MAP_TYPE_LRU_HASH, htab_lru_map_ops)
     97BPF_MAP_TYPE(BPF_MAP_TYPE_LRU_PERCPU_HASH, htab_lru_percpu_map_ops)
     98BPF_MAP_TYPE(BPF_MAP_TYPE_LPM_TRIE, trie_map_ops)
     99#ifdef CONFIG_PERF_EVENTS
    100BPF_MAP_TYPE(BPF_MAP_TYPE_STACK_TRACE, stack_trace_map_ops)
    101#endif
    102BPF_MAP_TYPE(BPF_MAP_TYPE_ARRAY_OF_MAPS, array_of_maps_map_ops)
    103BPF_MAP_TYPE(BPF_MAP_TYPE_HASH_OF_MAPS, htab_of_maps_map_ops)
    104#ifdef CONFIG_BPF_LSM
    105BPF_MAP_TYPE(BPF_MAP_TYPE_INODE_STORAGE, inode_storage_map_ops)
    106#endif
    107BPF_MAP_TYPE(BPF_MAP_TYPE_TASK_STORAGE, task_storage_map_ops)
    108#ifdef CONFIG_NET
    109BPF_MAP_TYPE(BPF_MAP_TYPE_DEVMAP, dev_map_ops)
    110BPF_MAP_TYPE(BPF_MAP_TYPE_DEVMAP_HASH, dev_map_hash_ops)
    111BPF_MAP_TYPE(BPF_MAP_TYPE_SK_STORAGE, sk_storage_map_ops)
    112BPF_MAP_TYPE(BPF_MAP_TYPE_CPUMAP, cpu_map_ops)
    113#if defined(CONFIG_XDP_SOCKETS)
    114BPF_MAP_TYPE(BPF_MAP_TYPE_XSKMAP, xsk_map_ops)
    115#endif
    116#ifdef CONFIG_INET
    117BPF_MAP_TYPE(BPF_MAP_TYPE_SOCKMAP, sock_map_ops)
    118BPF_MAP_TYPE(BPF_MAP_TYPE_SOCKHASH, sock_hash_ops)
    119BPF_MAP_TYPE(BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, reuseport_array_ops)
    120#endif
    121#endif
    122BPF_MAP_TYPE(BPF_MAP_TYPE_QUEUE, queue_map_ops)
    123BPF_MAP_TYPE(BPF_MAP_TYPE_STACK, stack_map_ops)
    124#if defined(CONFIG_BPF_JIT)
    125BPF_MAP_TYPE(BPF_MAP_TYPE_STRUCT_OPS, bpf_struct_ops_map_ops)
    126#endif
    127BPF_MAP_TYPE(BPF_MAP_TYPE_RINGBUF, ringbuf_map_ops)
    128BPF_MAP_TYPE(BPF_MAP_TYPE_BLOOM_FILTER, bloom_filter_map_ops)
    129
    130BPF_LINK_TYPE(BPF_LINK_TYPE_RAW_TRACEPOINT, raw_tracepoint)
    131BPF_LINK_TYPE(BPF_LINK_TYPE_TRACING, tracing)
    132#ifdef CONFIG_CGROUP_BPF
    133BPF_LINK_TYPE(BPF_LINK_TYPE_CGROUP, cgroup)
    134#endif
    135BPF_LINK_TYPE(BPF_LINK_TYPE_ITER, iter)
    136#ifdef CONFIG_NET
    137BPF_LINK_TYPE(BPF_LINK_TYPE_NETNS, netns)
    138BPF_LINK_TYPE(BPF_LINK_TYPE_XDP, xdp)
    139#endif
    140#ifdef CONFIG_PERF_EVENTS
    141BPF_LINK_TYPE(BPF_LINK_TYPE_PERF_EVENT, perf)
    142#endif
    143BPF_LINK_TYPE(BPF_LINK_TYPE_KPROBE_MULTI, kprobe_multi)
    144BPF_LINK_TYPE(BPF_LINK_TYPE_STRUCT_OPS, struct_ops)