I created a child process to perform some operation on a bpf map object, and I need to get the btf information about the object. I can get the map_fd of that object, but I cannot modify the child process code, which means I cannot pin that object. Also, I cannot get the id.
Currently, I try to iterate all the ids by using bpf_map_get_next_id and get the corresponding fd by using bpf_map_get_fd_by_id, where fd is equal to the fd I got from the child process. But I don't know whether the same fd refers to the same bpf map object under different processes.
Is there any way to get id by fd in BPF? Are the file descriptors of BPF objects the same in different processes? Is BPF id the unique identifier for BPF object?