netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ast@fb.com
Cc: daniel@iogearbox.net, aconole@bytheb.org, netdev@vger.kernel.org,
	xdp-newbies@vger.kernel.org
Subject: Re: [PATCH v3 binutils] Add BPF support to binutils...
Date: Sun, 30 Apr 2017 11:28:50 -0400 (EDT)	[thread overview]
Message-ID: <20170430.112850.863051989089519000.davem@davemloft.net> (raw)
In-Reply-To: <76ed19a7-add3-0642-4298-9402c7ff0be8@fb.com>

From: Alexei Starovoitov <ast@fb.com>
Date: Sat, 29 Apr 2017 23:44:59 -0700

> On 4/29/17 7:37 PM, David Miller wrote:
>> From: David Miller <davem@davemloft.net>
>> Date: Sat, 29 Apr 2017 22:24:50 -0400 (EDT)
>>
>>> Some of your bugs should be fixed by this patch below, I'll add
>>> test cases soon:
>>
>> Ok, here are all the local changes in my tree.  I made the relocs
>> match LLVM and I fixed some dwarf debugging stuff.
>>
>> With this we are also down to one test case failure under binutils/
>> and it's something weird with merging 64-bit notes which I should be
>> able to fix soon.
>>
>> I can fix these bugs fast, keep reporting.
>>
>> BTW, should I just remove tailcall from the opcode table altogether?
> 
> yeah. tailcall is not a special opcode from user space point of view.
> Only after normal call with func_id=bpf_tail_call passes verifier
> then verifier will change insn->code into CALL|X
> It's done only to have two 'case' statement in the interpreter,
> so that normal calls and tailcalls don't interfere.
> From user space pov CALL|X opcode is reserved and we can use it
> for something in the future. Just need to change interpeter and JITs.
> 
>>  	    case 'O':
>> -	      (*info->fprintf_func) (stream, "%d", off);
>> +	      (*info->fprintf_func) (stream, "%d", (int) off);
> 
> tried this diff. It looks better
>   10:	7b 1a f8 ff 00 00 00 00 	stdw	[r1+-8], r10
>   18:	79 a1 f8 ff 00 00 00 00 	lddw	r10, [r1+-8]
> I wonder if '+' can be removed as well.

All disassemblers in binutils print it this way, sparc, x86, etc.

> '-g' still doesn't seem to work:
> /w/binutils-gdb/bld/binutils/objdump: invalid relocation type 10
> /w/binutils-gdb/bld/binutils/objdump: BFD (GNU Binutils)
> 2.28.51.20170429 assertion fail ../../bfd/elf64-bpf.c:139
>    0:	18 01 00 00 39 47 98 83 	ldimm64	r0, 590618314553

Hmm, I defined a relocation type 10 in the patch, make sure BFD got
rebuilt properly...

I'll double check here too.

  reply	other threads:[~2017-04-30 15:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-28 20:33 [PATCH v3 binutils] Add BPF support to binutils David Miller
2017-04-30  0:48 ` Alexei Starovoitov
2017-04-30  2:11   ` David Miller
2017-04-30  2:13   ` David Miller
2017-04-30  2:24     ` Alexei Starovoitov
2017-04-30  2:24   ` David Miller
2017-04-30  2:37     ` David Miller
2017-04-30  6:44       ` Alexei Starovoitov
2017-04-30 15:28         ` David Miller [this message]
2017-04-30 15:40         ` David Miller
2017-04-30 18:21         ` David Miller
2017-05-02  2:49           ` Alexei Starovoitov
2017-05-02  3:03             ` David Miller
2017-05-02  3:14               ` Alexei Starovoitov

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=20170430.112850.863051989089519000.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=aconole@bytheb.org \
    --cc=ast@fb.com \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    --cc=xdp-newbies@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).