Re: [PATCH v2] pahole: Add --kabi_prefix flag

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

 





On 5/20/21 8:18 PM, Jiri Olsa wrote:
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


Yes, I am generating btf segment for centos 3.10 kernel. There are two main reasons for adding this patch: 1. There are too many kernel versions in centos 3.10, and a certain technical foundation is required to compile the kernel. 2. In my opinion, many people are using pahole to generate vmlinux btf segment, and there are still a large number of users on centos.





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux