public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Andrii Nakryiko <andriin@fb.com>
Cc: arnaldo.melo@gmail.com, andrii.nakryiko@gmail.com, ast@fb.com,
	yhs@fb.com, dwarves@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH pahole] pahole: use 32-bit integers for iterations within CU
Date: Thu, 7 Mar 2019 11:11:52 -0300	[thread overview]
Message-ID: <20190307141152.GX13100@kernel.org> (raw)
In-Reply-To: <20190307140917.GW13100@kernel.org>

Em Thu, Mar 07, 2019 at 11:09:17AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Mar 07, 2019 at 11:02:47AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Wed, Mar 06, 2019 at 04:23:21PM -0800, Andrii Nakryiko escreveu:
> > > Due to this assumption, libdwarves and other parts of pahole are using 16-bit
> > > counters to iterate over entities within CU. This can cause infinite loop when
> > > iterating BTF data, if there are more than 65535 types. This patch changes
> > > non-public variables to use 32-bit integers, where appropriate.
>  
> > Ok, there are some bits that are unrelated, I'm comment on it and remove
> > before applying.
> 
> Ooops, see below, I'm removing the non-type related parts, and will look
> at changing the types till btfdiff with that allyesconfig aarch64
> vmlinux image shows no diffs.

This one as well is not needed:

@@ -1225,7 +1225,7 @@ static size_t __class__fprintf(struct class *class, const struct cu *cu,
        struct tag *tag_pos;
        const char *current_accessibility = NULL;
        struct conf_fprintf cconf = conf ? *conf : conf_fprintf__defaults;
-       const uint16_t t = type->namespace.tag.tag;
+       const uint32_t t = type->namespace.tag.tag;
        size_t printed = fprintf(fp, "%s%s%s%s%s",
                                 cconf.prefix ?: "", cconf.prefix ? " " : "",
                                 ((cconf.classes_as_structs ||


As this is just for the type of the tag, not its type, i.e. its about
DW_TAG_struct_type, etc.

- Arnaldo

  reply	other threads:[~2019-03-07 14:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07  0:23 [PATCH pahole] pahole: use 32-bit integers for iterations within CU Andrii Nakryiko
2019-03-07 14:02 ` Arnaldo Carvalho de Melo
2019-03-07 14:09   ` Arnaldo Carvalho de Melo
2019-03-07 14:11     ` Arnaldo Carvalho de Melo [this message]
2019-03-08 19:39     ` Andrii Nakryiko
2019-03-08  0:26   ` Arnaldo Carvalho de Melo
2019-03-08 18:45     ` Arnaldo Carvalho de Melo
2019-03-08 19:42       ` Andrii Nakryiko
2019-03-11  4:31         ` Andrii Nakryiko
2019-03-11 14:53           ` Arnaldo Carvalho de Melo
2019-03-11 16:39             ` Andrii Nakryiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190307141152.GX13100@kernel.org \
    --to=arnaldo.melo@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=dwarves@vger.kernel.org \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox