[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW7911=38ym7ko23KLCFrgqCm0VFdQSu8Mqv+5Avc3sTFg@mail.gmail.com>
Date: Mon, 31 Jan 2022 16:35:23 -0800
From: Song Liu <song@...nel.org>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
Andrii Nakryiko <andrii@...nel.org>,
Kernel Team <kernel-team@...com>,
Peter Zijlstra <peterz@...radead.org>, X86 ML <x86@...nel.org>,
Ilya Leoshkevich <iii@...ux.ibm.com>,
Song Liu <songliubraving@...com>
Subject: Re: [PATCH v7 bpf-next 8/9] bpf: introduce bpf_jit_binary_pack_[alloc|finalize|free]
On Mon, Jan 31, 2022 at 4:21 PM Daniel Borkmann <daniel@...earbox.net> 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
Powered by blists - more mailing lists