Hi Ard,

On Tue, Oct 27, 2020 at 9:57 PM Ard Biesheuvel <a...@kernel.org> wrote:
> Commit 3193c0836f203 ("bpf: Disable GCC -fgcse optimization for
> ___bpf_prog_run()") introduced a __no_fgcse macro that expands to a
> function scope __attribute__((optimize("-fno-gcse"))), to disable a
> GCC specific optimization that was causing trouble on x86 builds, and
> was not expected to have any positive effect in the first place.
>
> However, as the GCC manual documents, __attribute__((optimize))
> is not for production use, and results in all other optimization
> options to be forgotten for the function in question. This can
> cause all kinds of trouble, but in one particular reported case,
> it causes -fno-asynchronous-unwind-tables to be disregarded,
> resulting in .eh_frame info to be emitted for the function
> inadvertently.
>
> This reverts commit 3193c0836f203, and instead, it disables the -fgcse
> optimization for the entire source file, but only when building for
> X86.
>
> Cc: Nick Desaulniers <ndesaulni...@google.com>
> Cc: Arvind Sankar <nived...@alum.mit.edu>
> Cc: Randy Dunlap <rdun...@infradead.org>
> Cc: Josh Poimboeuf <jpoim...@redhat.com>
> Cc: Thomas Gleixner <t...@linutronix.de>
> Cc: Alexei Starovoitov <a...@kernel.org>
> Cc: Daniel Borkmann <dan...@iogearbox.net>
> Cc: Peter Zijlstra (Intel) <pet...@infradead.org>
> Cc: Geert Uytterhoeven <ge...@linux-m68k.org>
> Cc: Kees Cook <keesc...@chromium.org>
> Fixes: 3193c0836f203 ("bpf: Disable GCC -fgcse optimization for 
> ___bpf_prog_run()")
> Signed-off-by: Ard Biesheuvel <a...@kernel.org>

Thanks, this gets rid of the following warning, which you may
want to quote in the patch description:

    aarch64-linux-gnu-ld: warning: orphan section `.eh_frame' from
`kernel/bpf/core.o' being placed in section `.eh_frame'

Tested-by: Geert Uytterhoeven <geert+rene...@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Reply via email to