Re: [PATCH v2 1/2] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-30 Thread Ard Biesheuvel
On Fri, 30 Oct 2020 at 04:22, Alexei Starovoitov wrote: > > On Thu, Oct 29, 2020 at 05:28:11PM -0700, Nick Desaulniers wrote: > > > > We already know that -fno-asynchronous-unwind-tables get dropped, > > hence this patch. > > On arm64 only. Not on x86 > > > And we know -fomit-frame-pointer or > >

Re: [PATCH v2 1/2] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-29 Thread Alexei Starovoitov
On Thu, Oct 29, 2020 at 05:28:11PM -0700, Nick Desaulniers wrote: > > We already know that -fno-asynchronous-unwind-tables get dropped, > hence this patch. On arm64 only. Not on x86 > And we know -fomit-frame-pointer or > -fno-omit-frame-pointer I guess gets dropped, hence your ask. yep. th

Re: [PATCH v2 1/2] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-29 Thread Ard Biesheuvel
On Thu, 29 Oct 2020 at 21:35, Segher Boessenkool wrote: > > On Wed, Oct 28, 2020 at 10:57:45PM -0400, Arvind Sankar wrote: > > On Wed, Oct 28, 2020 at 04:20:01PM -0700, Alexei Starovoitov wrote: > > > All compilers have bugs. Kernel has bugs. What can go wrong? > > Heh. > > > +linux-toolchains. GC

Re: [PATCH v2 1/2] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-29 Thread Segher Boessenkool
On Wed, Oct 28, 2020 at 10:57:45PM -0400, Arvind Sankar wrote: > On Wed, Oct 28, 2020 at 04:20:01PM -0700, Alexei Starovoitov wrote: > > All compilers have bugs. Kernel has bugs. What can go wrong? Heh. > +linux-toolchains. GCC updated the documentation in 7.x to discourage > people from using th

Re: [PATCH v2 1/2] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-29 Thread Geert Uytterhoeven
On Wed, Oct 28, 2020 at 6:15 PM Ard Biesheuvel wrote: > Commit 3193c0836 ("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 causi

Re: [PATCH v2 1/2] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-29 Thread Arvind Sankar
On Wed, Oct 28, 2020 at 04:20:01PM -0700, Alexei Starovoitov wrote: > On Thu, Oct 29, 2020 at 12:10:52AM +0100, Ard Biesheuvel wrote: > > On Wed, 28 Oct 2020 at 23:59, Alexei Starovoitov > > wrote: > > > > > > On Wed, Oct 28, 2020 at 11:15:04PM +0100, Ard Biesheuvel wrote: > > > > On Wed, 28 Oct 2

Re: [PATCH v2 1/2] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-28 Thread Ard Biesheuvel
On Wed, 28 Oct 2020 at 23:59, Alexei Starovoitov wrote: > > On Wed, Oct 28, 2020 at 11:15:04PM +0100, Ard Biesheuvel wrote: > > On Wed, 28 Oct 2020 at 22:39, Alexei Starovoitov > > wrote: > > > > > > On Wed, Oct 28, 2020 at 06:15:05PM +0100, Ard Biesheuvel wrote: > > > > Commit 3193c0836 ("bpf: D

Re: [PATCH v2 1/2] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-28 Thread Alexei Starovoitov
On Thu, Oct 29, 2020 at 12:10:52AM +0100, Ard Biesheuvel wrote: > On Wed, 28 Oct 2020 at 23:59, Alexei Starovoitov > wrote: > > > > On Wed, Oct 28, 2020 at 11:15:04PM +0100, Ard Biesheuvel wrote: > > > On Wed, 28 Oct 2020 at 22:39, Alexei Starovoitov > > > wrote: > > > > > > > > On Wed, Oct 28, 2

Re: [PATCH v2 1/2] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-28 Thread Alexei Starovoitov
On Wed, Oct 28, 2020 at 11:15:04PM +0100, Ard Biesheuvel wrote: > On Wed, 28 Oct 2020 at 22:39, Alexei Starovoitov > wrote: > > > > On Wed, Oct 28, 2020 at 06:15:05PM +0100, Ard Biesheuvel wrote: > > > Commit 3193c0836 ("bpf: Disable GCC -fgcse optimization for > > > ___bpf_prog_run()") introduced

Re: [PATCH v2 1/2] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-28 Thread Ard Biesheuvel
On Wed, 28 Oct 2020 at 22:39, Alexei Starovoitov wrote: > > On Wed, Oct 28, 2020 at 06:15:05PM +0100, Ard Biesheuvel wrote: > > Commit 3193c0836 ("bpf: Disable GCC -fgcse optimization for > > ___bpf_prog_run()") introduced a __no_fgcse macro that expands to a > > function scope __attribute__((opti

[PATCH v2 1/2] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-28 Thread Ard Biesheuvel
Commit 3193c0836 ("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 posi

Re: [PATCH v2 1/2] bpf: don't rely on GCC __attribute__((optimize)) to disable GCSE

2020-10-28 Thread Alexei Starovoitov
On Wed, Oct 28, 2020 at 06:15:05PM +0100, Ard Biesheuvel wrote: > Commit 3193c0836 ("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