2121#include <linux/kallsyms.h>
2222#include <linux/capability.h>
2323#include <linux/percpu-refcount.h>
24+ #include <linux/android_kabi.h>
2425
2526struct bpf_verifier_env ;
2627struct bpf_verifier_log ;
@@ -132,6 +133,9 @@ struct bpf_map_ops {
132133
133134 /* bpf_iter info used to open a seq_file */
134135 const struct bpf_iter_seq_info * iter_seq_info ;
136+
137+ ANDROID_KABI_RESERVE (1 );
138+ ANDROID_KABI_RESERVE (2 );
135139};
136140
137141struct bpf_map_memory {
@@ -218,6 +222,8 @@ struct bpf_map_dev_ops {
218222 int (* map_update_elem )(struct bpf_offloaded_map * map ,
219223 void * key , void * value , u64 flags );
220224 int (* map_delete_elem )(struct bpf_offloaded_map * map , void * key );
225+
226+ ANDROID_KABI_RESERVE (1 );
221227};
222228
223229struct bpf_offloaded_map {
@@ -459,6 +465,7 @@ struct bpf_verifier_ops {
459465 const struct btf_type * t , int off , int size ,
460466 enum bpf_access_type atype ,
461467 u32 * next_btf_id );
468+ ANDROID_KABI_RESERVE (1 );
462469};
463470
464471struct bpf_prog_offload_ops {
@@ -474,6 +481,7 @@ struct bpf_prog_offload_ops {
474481 int (* prepare )(struct bpf_prog * prog );
475482 int (* translate )(struct bpf_prog * prog );
476483 void (* destroy )(struct bpf_prog * prog );
484+ ANDROID_KABI_RESERVE (1 );
477485};
478486
479487struct bpf_prog_offload {
@@ -855,6 +863,7 @@ struct bpf_prog_aux {
855863 struct work_struct work ;
856864 struct rcu_head rcu ;
857865 };
866+ ANDROID_KABI_RESERVE (1 );
858867};
859868
860869struct bpf_array_aux {
@@ -1774,7 +1783,7 @@ static inline void bpf_map_offload_map_free(struct bpf_map *map)
17741783}
17751784#endif /* CONFIG_NET && CONFIG_BPF_SYSCALL */
17761785
1777- #if defined(CONFIG_BPF_STREAM_PARSER )
1786+ #if defined(CONFIG_INET ) && defined( CONFIG_BPF_SYSCALL )
17781787int sock_map_prog_update (struct bpf_map * map , struct bpf_prog * prog ,
17791788 struct bpf_prog * old , u32 which );
17801789int sock_map_get_from_fd (const union bpf_attr * attr , struct bpf_prog * prog );
@@ -1783,7 +1792,18 @@ int sock_map_update_elem_sys(struct bpf_map *map, void *key, void *value, u64 fl
17831792void sock_map_unhash (struct sock * sk );
17841793void sock_map_destroy (struct sock * sk );
17851794void sock_map_close (struct sock * sk , long timeout );
1795+
1796+ void bpf_sk_reuseport_detach (struct sock * sk );
1797+ int bpf_fd_reuseport_array_lookup_elem (struct bpf_map * map , void * key ,
1798+ void * value );
1799+ int bpf_fd_reuseport_array_update_elem (struct bpf_map * map , void * key ,
1800+ void * value , u64 map_flags );
17861801#else
1802+ static inline void bpf_sk_reuseport_detach (struct sock * sk )
1803+ {
1804+ }
1805+
1806+ #ifdef CONFIG_BPF_SYSCALL
17871807static inline int sock_map_prog_update (struct bpf_map * map ,
17881808 struct bpf_prog * prog ,
17891809 struct bpf_prog * old , u32 which )
@@ -1808,20 +1828,7 @@ static inline int sock_map_update_elem_sys(struct bpf_map *map, void *key, void
18081828{
18091829 return - EOPNOTSUPP ;
18101830}
1811- #endif /* CONFIG_BPF_STREAM_PARSER */
18121831
1813- #if defined(CONFIG_INET ) && defined(CONFIG_BPF_SYSCALL )
1814- void bpf_sk_reuseport_detach (struct sock * sk );
1815- int bpf_fd_reuseport_array_lookup_elem (struct bpf_map * map , void * key ,
1816- void * value );
1817- int bpf_fd_reuseport_array_update_elem (struct bpf_map * map , void * key ,
1818- void * value , u64 map_flags );
1819- #else
1820- static inline void bpf_sk_reuseport_detach (struct sock * sk )
1821- {
1822- }
1823-
1824- #ifdef CONFIG_BPF_SYSCALL
18251832static inline int bpf_fd_reuseport_array_lookup_elem (struct bpf_map * map ,
18261833 void * key , void * value )
18271834{
0 commit comments