Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-25 Thread Jiri Slaby
On 04/24/2017, 08:24 PM, David Miller wrote: > From: Jiri Slaby > Date: Mon, 24 Apr 2017 19:51:54 +0200 > >> For example what's the point of making the sk_load_word_positive_offset >> label a global, callable function? Note that this is exactly the reason >> why this particular two hunks look wei

Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-24 Thread David Miller
From: Jiri Slaby Date: Mon, 24 Apr 2017 19:51:54 +0200 > For example what's the point of making the sk_load_word_positive_offset > label a global, callable function? Note that this is exactly the reason > why this particular two hunks look weird to you even though the > annotations only mechanica

Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-24 Thread Jiri Slaby
On 04/24/2017, 06:47 PM, Alexei Starovoitov wrote: > On Mon, Apr 24, 2017 at 06:02:51PM +0200, Jiri Slaby wrote: >> On 04/24/2017, 05:55 PM, Ingo Molnar wrote: >>> * Jiri Slaby wrote: >>> On 04/24/2017, 05:08 PM, David Miller wrote: > If you align the entry points, then the code sequence

Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-24 Thread Alexei Starovoitov
On Mon, Apr 24, 2017 at 06:02:51PM +0200, Jiri Slaby wrote: > On 04/24/2017, 05:55 PM, Ingo Molnar wrote: > > * Jiri Slaby wrote: > > > >> On 04/24/2017, 05:08 PM, David Miller wrote: > >>> If you align the entry points, then the code sequence as a whole is > >>> are no longer densely packed. > >

Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-24 Thread Ingo Molnar
* Jiri Slaby wrote: > On 04/24/2017, 05:55 PM, Ingo Molnar wrote: > > * Jiri Slaby wrote: > > > >> On 04/24/2017, 05:08 PM, David Miller wrote: > >>> If you align the entry points, then the code sequence as a whole is > >>> are no longer densely packed. > >> > >> Sure. > >> > >>> Or do I misun

Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-24 Thread Jiri Slaby
On 04/24/2017, 05:55 PM, Ingo Molnar wrote: > * Jiri Slaby wrote: > >> On 04/24/2017, 05:08 PM, David Miller wrote: >>> If you align the entry points, then the code sequence as a whole is >>> are no longer densely packed. >> >> Sure. >> >>> Or do I misunderstand how your macros work? >> >> Perhap

Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-24 Thread Ingo Molnar
* Jiri Slaby wrote: > On 04/24/2017, 05:08 PM, David Miller wrote: > > If you align the entry points, then the code sequence as a whole is > > are no longer densely packed. > > Sure. > > > Or do I misunderstand how your macros work? > > Perhaps. So the suggested macros for the code are: > #de

Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-24 Thread Jiri Slaby
On 04/24/2017, 05:51 PM, David Miller wrote: > I said I'm not OK with the alignment So in short, the suggested macros add no alignment. -- js suse labs

Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-24 Thread David Miller
From: Jiri Slaby Date: Mon, 24 Apr 2017 17:41:06 +0200 > On 04/24/2017, 05:08 PM, David Miller wrote: >> If you align the entry points, then the code sequence as a whole is >> are no longer densely packed. > > Sure. > >> Or do I misunderstand how your macros work? > > Perhaps. So the suggested

Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-24 Thread Jiri Slaby
On 04/24/2017, 05:08 PM, David Miller wrote: > If you align the entry points, then the code sequence as a whole is > are no longer densely packed. Sure. > Or do I misunderstand how your macros work? Perhaps. So the suggested macros for the code are: #define BPF_FUNC_START_LOCAL(name) \

Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-24 Thread David Miller
From: Jiri Slaby Date: Mon, 24 Apr 2017 16:52:43 +0200 > On 04/24/2017, 04:41 PM, David Miller wrote: >>> It cannot stay as-is simply because we want to know where the functions >>> end to inject debuginfo properly. The code above does not warrant for >>> any exception. >> >> I totally and compl

Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-24 Thread Jiri Slaby
On 04/24/2017, 04:41 PM, David Miller wrote: >> It cannot stay as-is simply because we want to know where the functions >> end to inject debuginfo properly. The code above does not warrant for >> any exception. > > I totally and completely disagree. You can disagree as you wish but there is reall

Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-24 Thread David Miller
From: Jiri Slaby Date: Mon, 24 Apr 2017 08:45:11 +0200 > On 04/21/2017, 09:32 PM, Alexei Starovoitov wrote: >> On Fri, Apr 21, 2017 at 04:12:43PM +0200, Jiri Slaby wrote: >>> Do not use a custom macro FUNC for starts of the global functions, use >>> ENTRY instead. >>> >>> And while at it, annotat

Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-23 Thread Jiri Slaby
On 04/21/2017, 09:32 PM, Alexei Starovoitov wrote: > On Fri, Apr 21, 2017 at 04:12:43PM +0200, Jiri Slaby wrote: >> Do not use a custom macro FUNC for starts of the global functions, use >> ENTRY instead. >> >> And while at it, annotate also ends of the functions by ENDPROC. >> >> Signed-off-by: Ji

Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-21 Thread Alexei Starovoitov
On Fri, Apr 21, 2017 at 04:12:43PM +0200, Jiri Slaby wrote: > Do not use a custom macro FUNC for starts of the global functions, use > ENTRY instead. > > And while at it, annotate also ends of the functions by ENDPROC. > > Signed-off-by: Jiri Slaby > Cc: "David S. Miller" > Cc: Alexey Kuznetsov

[PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC

2017-04-21 Thread Jiri Slaby
Do not use a custom macro FUNC for starts of the global functions, use ENTRY instead. And while at it, annotate also ends of the functions by ENDPROC. Signed-off-by: Jiri Slaby Cc: "David S. Miller" Cc: Alexey Kuznetsov Cc: James Morris Cc: Hideaki YOSHIFUJI Cc: Patrick McHardy Cc: Thomas G