[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <EADA8A00-6CAC-48B9-BB15-24E121D21BD3@fb.com>
Date: Fri, 15 Oct 2021 06:51:00 +0000
From: Song Liu <songliubraving@...com>
To: Kumar Kartikeya Dwivedi <memxor@...il.com>
CC: "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, Martin Lau <kafai@...com>,
Yonghong Song <yhs@...com>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Toke Høiland-Jørgensen <toke@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH bpf-next v3 2/8] libbpf: Add typeless ksym support to
gen_loader
> On Oct 14, 2021, at 1:56 PM, Kumar Kartikeya Dwivedi <memxor@...il.com> wrote:
>
> This uses the bpf_kallsyms_lookup_name helper added in previous patches
> to relocate typeless ksyms. The return value ENOENT can be ignored, and
> the value written to 'res' can be directly stored to the insn, as it is
> overwritten to 0 on lookup failure. For repeating symbols, we can simply
> copy the previously populated bpf_insn.
>
> Also, we need to take care to not close fds for typeless ksym_desc, so
> reuse the 'off' member's space to add a marker for typeless ksym and use
> that to skip them in cleanup_relos.
>
> We add a emit_ksym_relo_log helper that avoids duplicating common
> logging instructions between typeless and weak ksym (for future commit).
>
> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@...il.com>
LGTM!
Acked-by: Song Liu <songliubraving@...com>
Powered by blists - more mailing lists