2222#include <linux/sched/mm.h>
2323#include <linux/slab.h>
2424#include <linux/percpu-refcount.h>
25+ #include <linux/bpfptr.h>
2526
2627struct bpf_verifier_env ;
2728struct bpf_verifier_log ;
@@ -1428,7 +1429,7 @@ struct bpf_iter__bpf_map_elem {
14281429int bpf_iter_reg_target (const struct bpf_iter_reg * reg_info );
14291430void bpf_iter_unreg_target (const struct bpf_iter_reg * reg_info );
14301431bool bpf_iter_prog_supported (struct bpf_prog * prog );
1431- int bpf_iter_link_attach (const union bpf_attr * attr , struct bpf_prog * prog );
1432+ int bpf_iter_link_attach (const union bpf_attr * attr , bpfptr_t uattr , struct bpf_prog * prog );
14321433int bpf_iter_new_fd (struct bpf_link * link );
14331434bool bpf_link_is_iter (struct bpf_link * link );
14341435struct bpf_prog * bpf_iter_get_info (struct bpf_iter_meta * meta , bool in_stop );
@@ -1459,7 +1460,7 @@ int bpf_fd_htab_map_update_elem(struct bpf_map *map, struct file *map_file,
14591460int bpf_fd_htab_map_lookup_elem (struct bpf_map * map , void * key , u32 * value );
14601461
14611462int bpf_get_file_flag (int flags );
1462- int bpf_check_uarg_tail_zero (void __user * uaddr , size_t expected_size ,
1463+ int bpf_check_uarg_tail_zero (bpfptr_t uaddr , size_t expected_size ,
14631464 size_t actual_size );
14641465
14651466/* memcpy that is used with 8-byte aligned pointers, power-of-8 size and
@@ -1479,8 +1480,7 @@ static inline void bpf_long_memcpy(void *dst, const void *src, u32 size)
14791480}
14801481
14811482/* verify correctness of eBPF program */
1482- int bpf_check (struct bpf_prog * * fp , union bpf_attr * attr ,
1483- union bpf_attr __user * uattr );
1483+ int bpf_check (struct bpf_prog * * fp , union bpf_attr * attr , bpfptr_t uattr );
14841484
14851485#ifndef CONFIG_BPF_JIT_ALWAYS_ON
14861486void bpf_patch_call_args (struct bpf_insn * insn , u32 stack_depth );
0 commit comments