Re: [PATCH 2/9] objtool: Fix ORC unwinding in non-JIT BPF generated code

2019-06-14 Thread Josh Poimboeuf
On Fri, Jun 14, 2019 at 08:13:49AM -0700, Alexei Starovoitov wrote: > On Fri, Jun 14, 2019 at 1:11 AM Peter Zijlstra wrote: > > > > On Fri, Jun 14, 2019 at 12:35:38AM -0700, Alexei Starovoitov wrote: > > > On Fri, Jun 14, 2019 at 09:08:52AM +0200, Peter Zijlstra wrote: > > > > On Thu, Jun 13, 2019

Re: [PATCH 2/9] objtool: Fix ORC unwinding in non-JIT BPF generated code

2019-06-14 Thread Alexei Starovoitov
On Fri, Jun 14, 2019 at 1:11 AM Peter Zijlstra wrote: > > On Fri, Jun 14, 2019 at 12:35:38AM -0700, Alexei Starovoitov wrote: > > On Fri, Jun 14, 2019 at 09:08:52AM +0200, Peter Zijlstra wrote: > > > On Thu, Jun 13, 2019 at 08:20:30PM -0500, Josh Poimboeuf wrote: > > > > On Thu, Jun 13, 2019 at 01

Re: [PATCH 2/9] objtool: Fix ORC unwinding in non-JIT BPF generated code

2019-06-14 Thread Peter Zijlstra
On Fri, Jun 14, 2019 at 12:35:38AM -0700, Alexei Starovoitov wrote: > On Fri, Jun 14, 2019 at 09:08:52AM +0200, Peter Zijlstra wrote: > > On Thu, Jun 13, 2019 at 08:20:30PM -0500, Josh Poimboeuf wrote: > > > On Thu, Jun 13, 2019 at 01:57:11PM -0700, Alexei Starovoitov wrote: > > > > > > and to pat

Re: [PATCH 2/9] objtool: Fix ORC unwinding in non-JIT BPF generated code

2019-06-14 Thread Alexei Starovoitov
On Fri, Jun 14, 2019 at 09:08:52AM +0200, Peter Zijlstra wrote: > On Thu, Jun 13, 2019 at 08:20:30PM -0500, Josh Poimboeuf wrote: > > On Thu, Jun 13, 2019 at 01:57:11PM -0700, Alexei Starovoitov wrote: > > > > and to patches 8 and 9. > > > > Well, it's your code, but ... can I ask why? AT&T synt

Re: [PATCH 2/9] objtool: Fix ORC unwinding in non-JIT BPF generated code

2019-06-14 Thread Peter Zijlstra
On Thu, Jun 13, 2019 at 08:20:30PM -0500, Josh Poimboeuf wrote: > On Thu, Jun 13, 2019 at 01:57:11PM -0700, Alexei Starovoitov wrote: > > and to patches 8 and 9. > > Well, it's your code, but ... can I ask why? AT&T syntax is the > standard for Linux, which is in fact the OS we are developing fo

Re: [PATCH 2/9] objtool: Fix ORC unwinding in non-JIT BPF generated code

2019-06-13 Thread Josh Poimboeuf
On Thu, Jun 13, 2019 at 06:37:21PM -0700, Alexei Starovoitov wrote: > On Thu, Jun 13, 2019 at 08:20:30PM -0500, Josh Poimboeuf wrote: > > On Thu, Jun 13, 2019 at 01:57:11PM -0700, Alexei Starovoitov wrote: > > > On Thu, Jun 13, 2019 at 08:20:59AM -0500, Josh Poimboeuf wrote: > > > > Objtool current

Re: [PATCH 2/9] objtool: Fix ORC unwinding in non-JIT BPF generated code

2019-06-13 Thread Alexei Starovoitov
On Thu, Jun 13, 2019 at 08:20:30PM -0500, Josh Poimboeuf wrote: > On Thu, Jun 13, 2019 at 01:57:11PM -0700, Alexei Starovoitov wrote: > > On Thu, Jun 13, 2019 at 08:20:59AM -0500, Josh Poimboeuf wrote: > > > Objtool currently ignores ___bpf_prog_run() because it doesn't > > > understand the jump ta

Re: [PATCH 2/9] objtool: Fix ORC unwinding in non-JIT BPF generated code

2019-06-13 Thread Josh Poimboeuf
On Thu, Jun 13, 2019 at 01:57:11PM -0700, Alexei Starovoitov wrote: > On Thu, Jun 13, 2019 at 08:20:59AM -0500, Josh Poimboeuf wrote: > > Objtool currently ignores ___bpf_prog_run() because it doesn't > > understand the jump table. This results in the ORC unwinder not being > > able to unwind thro

Re: [PATCH 2/9] objtool: Fix ORC unwinding in non-JIT BPF generated code

2019-06-13 Thread Alexei Starovoitov
On Thu, Jun 13, 2019 at 08:20:59AM -0500, Josh Poimboeuf wrote: > Objtool currently ignores ___bpf_prog_run() because it doesn't > understand the jump table. This results in the ORC unwinder not being > able to unwind through non-JIT BPF code. > > Luckily, the BPF jump table resembles a GCC switc

[PATCH 2/9] objtool: Fix ORC unwinding in non-JIT BPF generated code

2019-06-13 Thread Josh Poimboeuf
Objtool currently ignores ___bpf_prog_run() because it doesn't understand the jump table. This results in the ORC unwinder not being able to unwind through non-JIT BPF code. Luckily, the BPF jump table resembles a GCC switch jump table, which objtool already knows how to read. Add generic suppor