请教一下大佬两个问题可以吗?
(1)map_type值如何计算?
BPF_MAP_CREATE功能中map_type=0x17,这个是怎么计算出来的呢,我没有看明白。
(2)被劫持的函数如何确定?
文章中说在close()时调用map->ops->map_free(map),也就是偏移0x18处的map_free(),但是在exp中实际上劫持的是0x10处的map_release()*(unsigned long*)(fakestack+0x10) = stack_pivot_gadget;。非常奇怪,正常释放时,我下断点在map_free(),确实又停下来了。

struct bpf_map_ops {
    /* funcs callable from userspace (via syscall) */
    int (*map_alloc_check)(union bpf_attr *attr);
    struct bpf_map *(*map_alloc)(union bpf_attr *attr);
    void (*map_release)(struct bpf_map *map, struct file *map_file);
    void (*map_free)(struct bpf_map *map);
    int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key);
    void (*map_release_uref)(struct bpf_map *map);
 ......