Re: [PATCH 10/22] bpf: Disable GCC -fgcse optimization for ___bpf_prog_run()

2019-07-16 Thread Josh Poimboeuf
On Tue, Jul 16, 2019 at 11:15:54AM -0700, Nick Desaulniers wrote: > On Sun, Jul 14, 2019 at 5:37 PM Josh Poimboeuf wrote: > > > > On x86-64, with CONFIG_RETPOLINE=n, GCC's "global common subexpression > > elimination" optimization results in ___bpf_prog_run()'s jumptable code > > changing from thi

Re: [PATCH 10/22] bpf: Disable GCC -fgcse optimization for ___bpf_prog_run()

2019-07-16 Thread Nick Desaulniers
On Sun, Jul 14, 2019 at 5:37 PM Josh Poimboeuf wrote: > > On x86-64, with CONFIG_RETPOLINE=n, GCC's "global common subexpression > elimination" optimization results in ___bpf_prog_run()'s jumptable code > changing from this: > > select_insn: > jmp *jumptable(, %rax, 8) >

[PATCH 10/22] bpf: Disable GCC -fgcse optimization for ___bpf_prog_run()

2019-07-14 Thread Josh Poimboeuf
On x86-64, with CONFIG_RETPOLINE=n, GCC's "global common subexpression elimination" optimization results in ___bpf_prog_run()'s jumptable code changing from this: select_insn: jmp *jumptable(, %rax, 8) ... ALU64_ADD_X: ...