[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACAyw9_Ge8TirBZ8qs+y5cBw3cosFb0cAOvBpg58Oo7j5BpvbQ@mail.gmail.com>
Date: Mon, 26 Apr 2021 09:07:55 +0100
From: Lorenz Bauer <lmb@...udflare.com>
To: Andrii Nakryiko <andrii@...nel.org>
Cc: bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
Alexei Starovoitov <ast@...com>,
Daniel Borkmann <daniel@...earbox.net>,
Kernel Team <kernel-team@...com>
Subject: Re: [PATCH bpf-next 2/5] libbpf: support BTF_KIND_FLOAT during type
compatibility checks in CO-RE
On Sat, 24 Apr 2021 at 00:36, Andrii Nakryiko <andrii@...nel.org> wrote:
>
> Add BTF_KIND_FLOAT support when doing CO-RE field type compatibility check.
> Without this, relocations against float/double fields will fail.
>
> Also adjust one error message to emit instruction index instead of less
> convenient instruction byte offset.
>
> Fixes: 22541a9eeb0d ("libbpf: Add BTF_KIND_FLOAT support")
> Signed-off-by: Andrii Nakryiko <andrii@...nel.org>
> ---
> tools/lib/bpf/libbpf.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> index a1cddd17af7d..ff54ffef433a 100644
> --- a/tools/lib/bpf/libbpf.c
> +++ b/tools/lib/bpf/libbpf.c
> @@ -5141,6 +5141,7 @@ static int bpf_core_fields_are_compat(const struct btf *local_btf,
>
> switch (btf_kind(local_type)) {
> case BTF_KIND_PTR:
> + case BTF_KIND_FLOAT:
Nit: update the function comment as well?
Acked-by: Lorenz Bauer <lmb@...udflare.com>
--
Lorenz Bauer | Systems Engineer
6th Floor, County Hall/The Riverside Building, SE1 7PB, UK
www.cloudflare.com
Powered by blists - more mailing lists