All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Shuyi Cheng <chengshuyi@linux.alibaba.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>,
	dwarves@vger.kernel.org, wenan.mao@linux.alibaba.com,
	Jiri Olsa <jolsa@kernel.org>
Subject: Re: [PATCH v2] pahole: Add --kabi_prefix flag
Date: Thu, 20 May 2021 14:18:21 +0200	[thread overview]
Message-ID: <YKZTjViH1uJoMSyI@krava> (raw)
In-Reply-To: <ebbd7ace-f3ab-d104-c36c-788f4c169bbd@linux.alibaba.com>

On Thu, May 20, 2021 at 08:08:44PM +0800, Shuyi Cheng wrote:
> 
> 
> On 5/20/21 7:49 PM, Jiri Olsa wrote:
> > On Thu, May 20, 2021 at 06:27:48PM +0800, Shuyi Cheng wrote:
> > > 
> > > 
> > > On 5/20/21 4:07 AM, Jiri Olsa wrote:
> > > > On Wed, May 19, 2021 at 10:44:44AM +0800, Shuyi Cheng wrote:
> > > > > To solve problems similar to _RH_KABI_REPLACE. The _RH_KABI_REPLACE(_orig,
> > > > > _new) macros perserve size alignment and kabi agreement between _orig and
> > > > > _new.Below is the definition of this macro:
> > > > > 
> > > > > # define _RH_KABI_REPLACE(_orig, _new)            \
> > > > >       union {                        \
> > > > >           _new;                    \
> > > > >           struct {                \
> > > > >               _orig;                \
> > > > >           } __UNIQUE_ID(rh_kabi_hide);        \
> > > > >           __RH_KABI_CHECK_SIZE_ALIGN(_orig, _new);    \
> > > > >       }
> > > > 
> > > > hi,
> > > > that macro sounds familiar ;-) I think this should be already
> > > > solved directly in the header file by this one:
> > > > 
> > > >     https://gitlab.com/cki-project/kernel-ark/-/commit/331be9c5a436057ee852075c102d9d90a9046a30
> > > > 
> > > > jirka
> > > > 
> > > 
> > > Well, this patch solves this problem very well from the kernel level. But
> > > there are many mirrors [here](http://debuginfo.centos.org/7/x86_64/) that
> > > still have this problem. And these mirrors support ebpf, so it is very
> > > important to effectively extract the btf segment from these mirrors. :-)
> > 
> > hum, the link shows 3.10.* centos kernel, right?
> > AFAIK there's no BTF support in those kernels..
> > 
> > but maybe I'm missing some backporting channel,
> > could you please point me to related sources?
> > 
> > jirka
> > 
> 
> Yes, it is the centos kernel of version 3.10. This version of the centos
> kernel supports ebpf. As far as I think, BTF features don't depend on the
> kernel much. Only when using the STRUCT OPS feature does the kernel support
> BTF, see [here](https://github.com/libbpf/libbpf/blob/57375504c6c9766d23f178c40f71bf5e8df9363d/src/libbpf.c#L2549)
> and [here](https://www.spinics.net/lists/netdev/msg637060.html). Therefore,
> in the 3.10 version of the Centos kernel, with the help of the vmlinux btf
> segment, libbpf CO-RE can be easily supported.

ok, so you're generating BTF for centos 3.10 kernel?

I think that fix would be easy kernel backport, but I guess
we can go with pahole option just as well, if backport is
not an option for you

jirka


  reply	other threads:[~2021-05-20 12:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 12:06 [PATCH] btf: Add --btf_prefix flag 程书意
2021-05-17 14:42 ` Arnaldo Carvalho de Melo
2021-05-18  9:02   ` chengshuyi
2021-05-18 12:49     ` Arnaldo Carvalho de Melo
2021-05-18 18:30       ` Andrii Nakryiko
2021-05-19  2:44         ` [PATCH v2] pahole: Add --kabi_prefix flag Shuyi Cheng
2021-05-19 20:07           ` Jiri Olsa
     [not found]             ` <5D76A4F3-6F5A-4061-A274-34FFE5CBA338@gmail.com>
2021-05-19 21:18               ` Jiri Olsa
2021-05-19 21:36                 ` Arnaldo
2021-05-20 10:27             ` Shuyi Cheng
2021-05-20 11:49               ` Jiri Olsa
2021-05-20 12:08                 ` Shuyi Cheng
2021-05-20 12:18                   ` Jiri Olsa [this message]
2021-05-20 12:30                     ` Shuyi Cheng
2021-05-20 15:25           ` Jiri Olsa
2021-05-21  1:44             ` [PATCH v3] " Shuyi Cheng
2021-05-27 16:43               ` Arnaldo Carvalho de Melo

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=YKZTjViH1uJoMSyI@krava \
    --to=jolsa@redhat.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=chengshuyi@linux.alibaba.com \
    --cc=dwarves@vger.kernel.org \
    --cc=jolsa@kernel.org \
    --cc=wenan.mao@linux.alibaba.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.