BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Jiri Olsa <olsajiri@gmail.com>
Cc: dwarves@vger.kernel.org, arnaldo.melo@gmail.com,
	bpf@vger.kernel.org,  kernel-team@fb.com, ast@kernel.org,
	daniel@iogearbox.net, andrii@kernel.org,
		yonghong.song@linux.dev, Alan Maguire <alan.maguire@oracle.com>,
	Daniel Xu	 <dxu@dxuuu.xyz>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Vadim Fedorenko	 <vadfed@meta.com>
Subject: Re: [PATCH dwarves v1] btf_encoder: handle .BTF_ids section endianness when cross-compiling
Date: Fri, 22 Nov 2024 10:16:23 -0800	[thread overview]
Message-ID: <0db791f8da569ad7fdd4503ca94d897273576c60.camel@gmail.com> (raw)
In-Reply-To: <ba19c9a020f2f3d9895493930bdd3a7d7a58f1cd.camel@gmail.com>

On Fri, 2024-11-22 at 10:08 -0800, Eduard Zingerman wrote:

[...]

> So I assumed that this is hacky but not that bad.
> Given that current patch depends on implementation details it is
> probably better to switch to one of the alternatives:
> a. allocate new Elf_Data object using elf_newdata() API;
> b. just allocate a fake instance of Elf_Data on stack in btf_encoder__tag_kfuncs().
> 
> (a) seems to be an Ok option, wdyt?

Meh, any of these raise some questions about validity of API usage.
I'll just add a custom wrapper:

  struct converted_elf_data {
	void *d_buf;
        size_t d_size;
        size_t d_off;
        bool owns_buf;
  };

[...]


  reply	other threads:[~2024-11-22 18:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22  7:02 [PATCH dwarves v1] btf_encoder: handle .BTF_ids section endianness when cross-compiling Eduard Zingerman
2024-11-22 15:03 ` Vadim Fedorenko
2024-11-22 15:11 ` Jiri Olsa
2024-11-22 18:08   ` Eduard Zingerman
2024-11-22 18:16     ` Eduard Zingerman [this message]
2024-11-26 19:26 ` Andrii Nakryiko
2024-11-26 19:31   ` Eduard Zingerman
2024-11-26 21:51     ` Andrii Nakryiko
2024-11-27  0:30       ` Eduard Zingerman

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=0db791f8da569ad7fdd4503ca94d897273576c60.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=alan.maguire@oracle.com \
    --cc=andrii@kernel.org \
    --cc=arnaldo.melo@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=dwarves@vger.kernel.org \
    --cc=dxu@dxuuu.xyz \
    --cc=kernel-team@fb.com \
    --cc=memxor@gmail.com \
    --cc=olsajiri@gmail.com \
    --cc=vadfed@meta.com \
    --cc=yonghong.song@linux.dev \
    /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