[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <8dde9b25-fad5-7b94-7de6-a91b5db83415@linux.vnet.ibm.com>
Date: Wed, 23 May 2018 19:29:08 +0530
From: Sandipan Das <sandipan@...ux.vnet.ibm.com>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: Jakub Kicinski <jakub.kicinski@...ronome.com>, ast@...nel.org,
netdev@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
mpe@...erman.id.au, naveen.n.rao@...ux.vnet.ibm.com,
Quentin Monnet <quentin.monnet@...ronome.com>
Subject: Re: [PATCH bpf-next v3 10/10] tools: bpftool: add delimiters to
multi-function JITed dumps
On 05/23/2018 07:20 PM, Daniel Borkmann wrote:
> On 05/23/2018 12:37 PM, Sandipan Das wrote:
> [...]
>> Other than that, for powerpc64, there is a problem with the way the
>> binutils disassembler code (in "opcodes/ppc-dis.c") passes arguments
>> to the callback fprintf_json().
>>
>> In fprintf_json(), we always expect the va_list elements to resolve
>> to strings (char *). But for powerpc64, the register or immediate
>> operands are always passed as integers. So, when the code attempts
>> to resolve these operands using va_arg(ap, char *), bpftool crashes.
>> For now, I am using a workaround based on vsnprintf() but this does
>> not get the semantics correct for memory operands. You can probably
>> see that for the store instructions in the JSON dump above this.
>>
>> Daniel,
>>
>> Would it be okay if I send out a fix for this in a different series?
>
> I'm fine either way with regards to the fix. Feels like a portability bug
> in the binutils disassembler?
>
> We could probably have a feature test like in test-disassembler-four-args
> and select a workaround in bpftool based on that outcome.
>
> Thanks Sandipan!
>
> [1] tools/build/feature/test-disassembler-four-args.c
>
Cool. Thanks for the tip!
- Sandipan
Powered by blists - more mailing lists