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


Groups > linux.kernel > #1705939

Re: [PATCH RFC v2 3/5] samples/bpf: Fix inline asm issues building samples on arm64

From Joel Fernandes <joelaf@google.com>
Newsgroups linux.kernel
Subject Re: [PATCH RFC v2 3/5] samples/bpf: Fix inline asm issues building samples on arm64
Date 2017-08-08 03:30 +0200
Message-ID <uc1vk-wk-3@gated-at.bofh.it> (permalink)
References <ubPXc-bV-13@gated-at.bofh.it> <ubPXd-bV-51@gated-at.bofh.it> <ubUWR-3Xj-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Dave,

On Mon, Aug 7, 2017 at 11:28 AM, David Miller <davem@davemloft.net> wrote:
>
> Please, no.

Sorry you dislike it, I had intentionally marked it as RFC as its an
idea I was just toying with the idea and posted it early to get
feedback.

>
> The amount of hellish hacks we are adding to deal with this is getting
> way out of control.

I agree with you that hellish hacks are being added which is why it
keeps breaking. I think one of the things my series does is to add
back inclusion of asm headers that were previously removed (that is
the worst hellish hack in my opinion that existing in mainline). So in
that respect my patch is an improvement and makes it possible to build
for arm64 platforms (which is currently broken in mainline).

>
> BPF programs MUST have their own set of asm headers, this is the
> only way to get around this issue in the long term.

Wouldn't that break scripts or bpf code that instruments/trace arch
specific code?

>
> I am also strongly against adding -static to the build.

I can drop -static if you prefer, that's not an issue.

As I understand it, there are no other cleaner alternatives and this
patchset makes the samples work. I would even argue that's its more
functional than previous attempts and fixes something broken in
mainline in a more generic way. If you can provide an example of where
my patchset may not work, I would love to hear it. My whole idea was
to do it in a way that makes future breakage not happen. I don't think
that leaving things broken in this state for extended periods of time
makes sense and IMHO will slow usage of bpf samples on other
platforms.

thanks,

-Joel

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


Thread

[PATCH RFC v2 0/5] add arm64 cross compilation support to BPF samples Joel Fernandes <joelaf@google.com> - 2017-08-07 15:10 +0200
  [PATCH RFC v2 4/5] samples/bpf: Fix pt_regs issues when cross-compiling Joel Fernandes <joelaf@google.com> - 2017-08-07 15:10 +0200
  [PATCH RFC v2 3/5] samples/bpf: Fix inline asm issues building samples on arm64 Joel Fernandes <joelaf@google.com> - 2017-08-07 15:10 +0200
    Re: [PATCH RFC v2 3/5] samples/bpf: Fix inline asm issues building  samples on arm64 Joel Fernandes <joelaf@google.com> - 2017-08-07 15:20 +0200
    Re: [PATCH RFC v2 3/5] samples/bpf: Fix inline asm issues building  samples on arm64 David Miller <davem@davemloft.net> - 2017-08-07 20:30 +0200
      Re: [PATCH RFC v2 3/5] samples/bpf: Fix inline asm issues building  samples on arm64 Joel Fernandes <joelaf@google.com> - 2017-08-08 03:30 +0200
        Re: [PATCH RFC v2 3/5] samples/bpf: Fix inline asm issues building  samples on arm64 David Miller <davem@davemloft.net> - 2017-08-09 05:40 +0200

csiph-web