Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1629777

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

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC
Date 2017-04-24 18:50 +0200
Message-ID <tzPlv-Xy-3@gated-at.bofh.it> (permalink)
References (2 earlier) <tzND3-8gU-15@gated-at.bofh.it> <tzNMK-7V-21@gated-at.bofh.it> <tzOpt-mK-41@gated-at.bofh.it> <tzOz9-q9-35@gated-at.bofh.it> <tzOIO-JE-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* Jiri Slaby <jslaby@suse.cz> wrote:

> On 04/24/2017, 05:55 PM, Ingo Molnar wrote:
> > * Jiri Slaby <jslaby@suse.cz> 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:
> >> #define BPF_FUNC_START_LOCAL(name) \
> >> 		SYM_START(name, SYM_V_LOCAL, SYM_A_NONE)
> >> #define BPF_FUNC_START(name) \
> >> 		SYM_START(name, SYM_V_GLOBAL, SYM_A_NONE)
> >>
> >> and they differ from the standard ones:
> >> #define SYM_FUNC_START_LOCAL(name)                      \
> >>         SYM_START(name, SYM_V_LOCAL, SYM_A_ALIGN)
> >> #define SYM_FUNC_START(name)                            \
> >>         SYM_START(name, SYM_V_GLOBAL, SYM_A_ALIGN)
> >>
> >>
> >> The difference is SYM_A_NONE vs. SYM_A_ALIGN, which means:
> >> #define SYM_A_ALIGN                             ALIGN
> >> #define SYM_A_NONE                              /* nothing */
> >>
> >> Does it look OK now?
> > 
> > No, the patch changes alignment which is undesirable, it needs to preserve the 
> > existing (non-)alignment of the symbols!
> 
> OK, so I am not expressing myself explicitly enough, it seems.
> 
> So, correct, the patch v3 adds alignments. I suggested in the discussion
> the macros above. They do not add alignments. If everybody is OK with
> that, v4 of the patch won't add alignments. OK?

Yes.

Thanks,

	Ingo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC Jiri Slaby <jslaby@suse.cz> - 2017-04-21 16:30 +0200
  Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2017-04-21 21:40 +0200
    Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC Jiri Slaby <jslaby@suse.cz> - 2017-04-24 08:50 +0200
      Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC David Miller <davem@davemloft.net> - 2017-04-24 16:50 +0200
        Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC Jiri Slaby <jslaby@suse.cz> - 2017-04-24 17:00 +0200
          Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC David Miller <davem@davemloft.net> - 2017-04-24 17:10 +0200
            Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC Jiri Slaby <jslaby@suse.cz> - 2017-04-24 17:50 +0200
              Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC David Miller <davem@davemloft.net> - 2017-04-24 18:00 +0200
                Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC Jiri Slaby <jslaby@suse.cz> - 2017-04-24 18:00 +0200
              Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC Ingo Molnar <mingo@kernel.org> - 2017-04-24 18:00 +0200
                Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC Jiri Slaby <jslaby@suse.cz> - 2017-04-24 18:10 +0200
                Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC Ingo Molnar <mingo@kernel.org> - 2017-04-24 18:50 +0200
                Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2017-04-24 18:50 +0200
                Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC Jiri Slaby <jslaby@suse.cz> - 2017-04-24 20:00 +0200
                Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC David Miller <davem@davemloft.net> - 2017-04-24 20:30 +0200
                Re: [PATCH v3 07/29] x86: bpf_jit, use ENTRY+ENDPROC Jiri Slaby <jslaby@suse.cz> - 2017-04-25 16:50 +0200

csiph-web