Re: [PATCH dwarves 04/11] btf_loader: use libbpf to load BTF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 8, 2020 at 11:59 AM Arnaldo Carvalho de Melo
<acme@xxxxxxxxxx> wrote:
>
> Em Tue, Sep 29, 2020 at 09:27:35PM -0700, Andrii Nakryiko escreveu:
> > Switch BTF loading to completely use libbpf's own struct btf and related APIs.
> > BTF encoding is still happening with pahole's own code, so these two code
> > paths are not sharing anything now. String fetching is happening based on
> > whether btfe->strings were set to non-NULL pointer by btf_encoder.
>
> This patch is not applying, since there was a fix in the btf_loader.c
> file where lexblocks (DWARF concept) wasn't being initialized and then
> some other tool was segfaulting when trying to traverse an uninitialized
> list.
>
> I tried applying this patch by hand, but it seems it needs some
> massaging before I can use plain vim on it:
>
> diff --git a/btf_loader.c b/btf_loader.c
> index 9db76957a7e5..c31ee61060f1 100644
> --- a/btf_loader.c
> +++ b/btf_loader.c
> @@ -46,21 +46,17 @@ static void *tag__alloc(const size_t size)
>  }
> =20
>  static int btf_elf__load_ftype(struct btf_elf *btfe, struct ftype *proto=
> , uint32_t tag,
> -                              uint32_t type, uint16_t vlen, struct btf_param *args, uint32_t=
>  id)
> +                              const struct btf_type *tp, uint32_t id)
>  {
> -       int i;
> +       const struct btf_param *param =3D btf_params(tp);
> +       int i, vlen =3D btf_vlen(tp);
> =20
>         proto->tag.tag  =3D tag;
> -       proto->tag.type =3D type;
> +       proto->tag.type =3D tp->type;
>         INIT_LIST_HEAD(&proto->parms);
> =20
> -       for (i =3D 0; i < vlen; ++i) {
>
>
> Can you please check?
>
> The first three patches are already applied an in master, both at
> kernel.org and its mirror at github.com.

Sure, no problem. I'll rebase the rest and post as v2.

>
> - Arnaldo
>

[...]



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux