All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Andrii Nakryiko <andriin@fb.com>
Cc: yhs@fb.com, ast@fb.com, dwarves@vger.kernel.org,
	bpf@vger.kernel.org, andrii.nakryiko@gmail.com
Subject: Re: [PATCH v2 pahole 2/2] btf_encoder: don't special case packed enums
Date: Tue, 26 Feb 2019 11:07:37 -0300	[thread overview]
Message-ID: <20190226140737.GB26786@kernel.org> (raw)
In-Reply-To: <20190226011927.597075-3-andriin@fb.com>

Em Mon, Feb 25, 2019 at 05:19:27PM -0800, Andrii Nakryiko escreveu:
> BTF data can represent packed enums correctly without any special
> handling from pahole side. Previously pahole's own `enum vscope` would
> be omitted causing problems.
> 
> Original commit tried to generate correct struct bitfield member type if
> the member is an enum. This was dated before kind_flag implementation.
> Later, kind_flag support was added and now pahole always generates BTF
> with kind_flag = 1 for structures with bitfield, where bitfield size is
> encoded in btf_member, so this workaround is not needed any more.
> Removing this "hack" makes handling it easier to handle packed enums
> correctly.

<SNIP excellent repro before/after text>
 
> Fixes: b18354f64cc2 ("btf: Generate correct struct bitfield member types")
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>
> Acked-by: Yonghong Song <yhs@fb.com>

Thanks a lot, tested it with vmlinux, libc, your repro, all working
jist fine, applied!

Now out to get a vmlinux for a different arch to check that as well.

- Arnaldo

      reply	other threads:[~2019-02-26 14:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26  1:19 [PATCH v2 pahole 0/2] fix two more DWARF/BTF discrepancies Andrii Nakryiko
2019-02-26  1:19 ` [PATCH v2 pahole 1/2] btf_loader: simplify fixup code by relying on BTF data more Andrii Nakryiko
2019-02-26  1:19 ` [PATCH v2 pahole 2/2] btf_encoder: don't special case packed enums Andrii Nakryiko
2019-02-26 14:07   ` Arnaldo Carvalho de Melo [this message]

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=20190226140737.GB26786@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.