On Mon, Nov 20, 2023 at 09:59:24AM -0800, Dave Marchevsky wrote: > +void *alloc_mmapable_selem_value(struct bpf_local_storage_map *smap) should be static? > +static int task_storage_map_mmap(struct bpf_map *map, struct vm_area_struct *vma) > +{ > + void *data; > + > + if (!(map->map_flags & BPF_F_MMAPABLE) || vma->vm_pgoff || > + (vma->vm_end - vma->vm_start) < map->value_size) > + return -EINVAL; > + > + WARN_ON_ONCE(!bpf_rcu_lock_held()); why? This is mmap() syscall. What is the concern? > + bpf_task_storage_lock(); > + data = __bpf_task_storage_get(map, current, NULL, BPF_LOCAL_STORAGE_GET_F_CREATE, > + 0, true); 0 for gfp_flags? It probably should be GFP_USER?