From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm: eBPF JIT compiler
Date: Mon, 12 Jun 2017 12:06:11 +0100 [thread overview]
Message-ID: <20170612110611.GC4902@n2100.armlinux.org.uk> (raw)
In-Reply-To: <593E6B0F.8070901@iogearbox.net>
On Mon, Jun 12, 2017 at 12:21:03PM +0200, Daniel Borkmann wrote:
> On 05/30/2017 09:19 PM, Kees Cook wrote:
> >On Thu, May 25, 2017 at 4:13 PM, Shubham Bansal
> ><illusionist.neo@gmail.com> wrote:
> >>+static int validate_code(struct jit_ctx *ctx)
> >>+{
> >>+ int i;
> >>+
> >>+ for (i = 0; i < ctx->idx; i++) {
> >>+ u32 a32_insn = le32_to_cpu(ctx->target[i]);
>
> Given __opcode_to_mem_arm(ARM_INST_UDF) is used to fill the image,
> perhaps use the __mem_to_opcode_arm() helper for the check?
>
> >>+ if (a32_insn == ARM_INST_UDF)
The following is probably better:
if (ctx->target[i] == __opcode_to_mem_arm(ARM_INST_UDF))
since then you can take advantage of the compiler optimising the
constant rather than having to do a byte swap on an unknown 32-bit
value.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2017-06-12 11:06 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-25 23:13 [PATCH v2] arm: eBPF JIT compiler Shubham Bansal
2017-05-25 23:23 ` Andrew Lunn
2017-05-25 23:34 ` Shubham Bansal
2017-05-25 23:36 ` Shubham Bansal
2017-05-26 16:57 ` Shubham Bansal
2017-05-30 18:50 ` Shubham Bansal
2017-05-30 19:11 ` Kees Cook
[not found] ` <CAGXu5jKmLNMR+uhM9Ov2XPW6kCjip_SjScgEH0fTFp6fQtKFiA@mail.gmail.com>
[not found] ` <CAHgaXdJ=-n8J8ot_5YQC=YMZrwTBvdNTp5Ta_J_J9vNGWQ4DCQ@mail.gmail.com>
2017-06-12 2:00 ` Kees Cook
2017-06-12 10:21 ` Daniel Borkmann
2017-06-12 11:06 ` Russell King - ARM Linux [this message]
2017-06-12 15:41 ` Shubham Bansal
2017-06-12 15:40 ` Shubham Bansal
2017-06-12 22:45 ` Alexander Alemayhu
2017-06-12 22:47 ` David Miller
2017-06-12 23:17 ` Daniel Borkmann
2017-06-13 6:56 ` Shubham Bansal
2017-06-14 20:31 ` Daniel Borkmann
2017-06-17 12:23 ` Shubham Bansal
2017-06-19 18:10 ` Daniel Borkmann
2017-06-20 1:34 ` Shubham Bansal
2017-06-20 16:55 ` Daniel Borkmann
2017-06-21 14:26 ` Shubham Bansal
2017-06-21 16:32 ` Daniel Borkmann
2017-06-21 19:37 ` Shubham Bansal
2017-06-21 19:53 ` Daniel Borkmann
[not found] ` <CAHgaXdKCOM++jdoaq9PV6a_bbRU+VyuLC4KeUdYmA0gYdhmhkQ@mail.gmail.com>
2017-07-05 22:11 ` Kees Cook
2017-07-05 22:38 ` Kees Cook
[not found] ` <CAHgaXd+ywWu6PjnqGGdyw=7=XTKm4_Ny227Eq7yH5N0s0e5YfA@mail.gmail.com>
2017-07-07 4:42 ` Kees Cook
2017-07-07 4:49 ` Shubham Bansal
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=20170612110611.GC4902@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/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).