Re: [PATCH v4 2/2] bpf: Fix ORC unwinding in non-JIT BPF code
From: Alexei Starovoitov
Date: Fri Jun 28 2019 - 11:37:16 EST
On Thu, Jun 27, 2019 at 6:51 PM Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
>
> Objtool previously ignored ___bpf_prog_run() because it didn't
> understand the jump table. This resulted in the ORC unwinder not being
> able to unwind through non-JIT BPF code.
>
> Now that objtool knows how to read jump tables, remove the whitelist and
> annotate the jump table so objtool can recognize it.
>
> Also add an additional "const" to the jump table definition to clarify
> that the text pointers are constant. Otherwise GCC sets the section
> writable flag and the assembler spits out warnings.
>
> Fixes: d15d356887e7 ("perf/x86: Make perf callchains work without CONFIG_FRAME_POINTER")
> Reported-by: Song Liu <songliubraving@xxxxxx>
> Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
I'm traveling atm, but the set looks good.
Acked-by: Alexei Starovoitov <ast@xxxxxxxxxx>
If tip maintainers can route it to Linus quickly then
please send the whole thing via tip tree.
Or we can send these two patches via bpf tree early next week.