From: David Miller <davem@davemloft.net>
To: daniel@iogearbox.net
Cc: david.daney@cavium.com, ast@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mips@linux-mips.org,
ralf@linux-mips.org, catalin.marinas@arm.com,
will.deacon@arm.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC 2/3] samples/bpf: Add define __EMITTING_BPF__ when building BPF
Date: Fri, 16 Jun 2017 12:14:34 -0400 (EDT) [thread overview]
Message-ID: <20170616.121434.859810061597099237.davem@davemloft.net> (raw)
In-Reply-To: <5943B1C6.7040809@iogearbox.net>
From: Daniel Borkmann <daniel@iogearbox.net>
Date: Fri, 16 Jun 2017 12:24:06 +0200
> On 06/16/2017 12:35 AM, David Daney wrote:
>> ... this allows gating of inline assembly code that causes llvm to
>> fail when emitting BPF.
>>
>> Signed-off-by: David Daney <david.daney@cavium.com>
>
> I don't have a better idea at the moment, perhaps there could be
> a clang rewrite plugin that would ignore all inline assembly code
> since this is never used from BPF progs. Hmm. Really ugly that
> we have to add this __EMITTING_BPF__ into arch asm files, but I
> don't have a better idea for an immediate workaround right now ...
> I would really prefer if we could avoid just for the sake of the
> kernel samples going down the road of adding a
> !defined(__EMITTING_BPF__)
> into a uapi asm header for mips, though. Is this coming from
> networking sample code or rather tracing?
The problem is that we include the arch include/asm files at all.
When we build bpf stuff, we should have a set of asm/ files
specifically for builds targetting BPF.
Let's just fix this right and stop putting all of these hacks in.
Thank you.
next prev parent reply other threads:[~2017-06-16 16:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-15 22:35 [PATCH RFC 0/3] bpf/arm64/mips: Avoid inline asm in BPF David Daney
2017-06-15 22:35 ` [PATCH RFC 1/3] arm64: Gate inclusion of asm/sysreg.h by __EMITTING_BPF__ David Daney
2017-06-15 22:35 ` [PATCH RFC 2/3] samples/bpf: Add define __EMITTING_BPF__ when building BPF David Daney
2017-06-16 10:24 ` Daniel Borkmann
2017-06-16 16:14 ` David Miller [this message]
2017-06-19 14:37 ` Andy Gospodarek
2017-06-15 22:35 ` [PATCH RFC 3/3] MIPS: Include file changes to enable building BPF code with llvm David Daney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170616.121434.859810061597099237.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ast@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=daniel@iogearbox.net \
--cc=david.daney@cavium.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=netdev@vger.kernel.org \
--cc=ralf@linux-mips.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).