BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	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>
Subject: Re: [PATCH dwarves v3 1/1] btf_encoder: handle .BTF_ids section endianness
Date: Wed, 27 Nov 2024 09:53:18 -0800	[thread overview]
Message-ID: <66720931d0e98065804320142139e963c6de6c37.camel@gmail.com> (raw)
In-Reply-To: <6187706f-5c7f-4c22-9854-b3225b841385@linux.dev>

On Wed, 2024-11-27 at 12:03 +0000, Vadim Fedorenko wrote:

[...]

> > looks good, I'm just curious about one thing..
> > 
> > so ELF_T_WORD enum has this comment: /* Elf32_Word, Elf64_Word, ... */
> > 
> > I did just quick check, ***so I might be easily wrong***, but I wonder the
> > code in __elf_xfctstom (which I assume is the one called for conversion)
> > chooses to swap 32/64 bits values based on elf->class .. so for 64bit ELF
> > class we swap 64bit values? ... while .BTF_ids has always 32 bit values
> 
> Well according to the doc:
> 
>         ELF_T_WORD     Unsigned 32-bit words.
>         ELF_T_XWORD    Unsigned 64-bit words.
> 
> It shouldn't use 64 bits swap:
> 
> const xfct_t __elf_xfctstom[EV_NUM - 1][EV_NUM - 1][ELFCLASSNUM - 
> 1][ELF_T_NUM] =
> ....
> 	[ELF_T_WORD]	= ElfW2(Bits, cvt_Word),			
> 	[ELF_T_XWORD]	= ElfW2(Bits, cvt_Xword),			
> ...
> 
> Are you looking somewhere else?

Right, thank you, Vadim.

[...]


  parent reply	other threads:[~2024-11-27 17:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-27  1:50 [PATCH dwarves v3 0/1] btf_encoder: handle .BTF_ids section endianness Eduard Zingerman
2024-11-27  1:50 ` [PATCH dwarves v3 1/1] " Eduard Zingerman
2024-11-27 11:00   ` Jiri Olsa
2024-11-27 12:03     ` Vadim Fedorenko
2024-11-27 12:35       ` Jiri Olsa
2024-11-27 17:53       ` Eduard Zingerman [this message]
2024-11-27 13:59   ` Vadim Fedorenko
2024-11-28 20:26     ` Arnaldo Carvalho de Melo
2024-11-28 21:14       ` 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=66720931d0e98065804320142139e963c6de6c37.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=vadim.fedorenko@linux.dev \
    --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