On Mon, Jan 31, 2022 at 4:21 PM Daniel Borkmann <daniel@xxxxxxxxxxxxx> wrote: > > On 1/29/22 12:45 AM, Song Liu wrote: > [...] [...] > > +} > > + > > +/* Copy JITed text from rw_header to its final location, the ro_header. */ > > +int bpf_jit_binary_pack_finalize(struct bpf_prog *prog, > > + struct bpf_binary_header *ro_header, > > + struct bpf_binary_header *rw_header) > > +{ > > + void *ptr; > > + > > + ptr = bpf_arch_text_copy(ro_header, rw_header, rw_header->size); > > Does this need to be wrapped with a text_mutex lock/unlock pair given > text_poke_copy() internally relies on __text_poke() ? Yes... Good catch. I guess we may do the lock in text_poke_copy(). Thanks, Song