netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Kees Cook <keescook@chromium.org>,
	Shubham Bansal <illusionist.neo@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
	"kernel-hardening@lists.openwall.com"
	<kernel-hardening@lists.openwall.com>,
	Network Development <netdev@vger.kernel.org>,
	ast@fb.com, Mircea Gherzan <mgherzan@gmail.com>,
	David Miller <davem@davemloft.net>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	nschichan@freebox.fr, andrew@lunn.ch
Subject: Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit
Date: Mon, 22 May 2017 12:08:17 -0700	[thread overview]
Message-ID: <8c53012b-cb81-5228-de79-f55457d1cf69@gmail.com> (raw)
In-Reply-To: <CAGXu5j+k+NMQGmmhuW-4pHFd6agfndJfxQ9k--h+ZpsDBVB8ig@mail.gmail.com>

On 05/22/2017 11:58 AM, Kees Cook wrote:
> On Sat, May 20, 2017 at 1:01 PM, Shubham Bansal
> <illusionist.neo@gmail.com> wrote:
>> Hi Daniel and Kees,
>>
>> Before I send the patch, I have tested the JIT compiler on ARMv7 but
>> not on ARMv5 or ARMv6. So can you tell me which arch versions I should
>> test it for?
>> Also for my testing, CONFIG_FRAME_POINTER and CONFIG_CPU_BIG_ENDIAN
>> are both disabled. But I need to test JIT with these flags as well.
>> Whenever I put these flags in .config file, the arm kernel is not
>> getting compiler with these flags. Can you tell me why? If you need
>> more information regarding this, please let me know.
> 
> I think it is fine to only target ARMv7. It is harder and harder to
> find devices on v5 or v6 CPUs that would want to be using BPF JIT,
> IMO.

There are still a ton of Marvell-based routers out there (e.g: Kirkwood,
Orion5x) that are ARMv5 and that prompted Nicholas (hey there) to fix
the cBPF JIT a while ago. I don't think you can just ignore those, it's
fine not to target them initially, but arguably, QEMU has decent support
for some ARMv5 platforms that could be used for testing as well
(realview-eb, versatileab/pbm.

These devices are actually perfect candidates for running eBPF and to
some extent XDP because they are slightly under powered compared to
their newest ARMv7/ARMv8 counterparts.

> 
> When they "disappear", it's because there isn't a prerequisite met. I
> either read the Kconfig files or use "make menuconfig" and "search" to
> tell me where a config is defined and what is needed to meet the
> prerequisites.
> 
> In the case of CPU_BIG_ENDIAN, you need ARCH_SUPPORTS_BIG_ENDIAN,
> which appears to be only ARCH_IXP4XX. I don't think you're going to
> find an emulator that will handle this, so I'd suggest ignoring this
> config for now unless you can find someone with that hardware that you
> can work with to test it.
> 
> In the case of CONFIG_FRAME_POINTER, I assume you built a
> THUMB2_KERNEL? I'd read the notes in arch/arm/Kconfig.debug for
> 'config FRAME_POINTER'.

It sounds like we are at the point where Shubham's patches should be
posted so people could test/fix on earlier ARM devices for instance.

Thanks
-- 
Florian

  reply	other threads:[~2017-05-22 19:08 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHgaXdKsO2xoKYp7g91g+n+d_1KHSSByLjzBB-WjVXSjhB7qxw@mail.gmail.com>
     [not found] ` <20170510.212952.1440495072777358778.davem@davemloft.net>
     [not found]   ` <CAHgaXdK8LEEUPm4jTRRzCnjwdWAauHmmB=caZsSFY8MmStH89Q@mail.gmail.com>
     [not found]     ` <20170510.215218.2185526627014393313.davem@davemloft.net>
     [not found]       ` <CAHgaXdKZ_v+iO7uqEDx7PA7D+xcp1FngGvJ1SRSsGXNQ-iWWDQ@mail.gmail.com>
2017-05-11  9:32         ` arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit Shubham Bansal
2017-05-11 15:30           ` Kees Cook
2017-05-13 21:38             ` Shubham Bansal
2017-05-15 17:44               ` Kees Cook
2017-05-15 19:55               ` Daniel Borkmann
2017-05-20 20:01                 ` Shubham Bansal
2017-05-22 13:01                   ` Daniel Borkmann
2017-05-22 17:04                     ` Shubham Bansal
2017-05-22 20:05                       ` Kees Cook
2017-05-23  2:58                         ` Shubham Bansal
2017-05-23  4:27                           ` Kees Cook
2017-05-22 18:58                   ` Kees Cook
2017-05-22 19:08                     ` Florian Fainelli [this message]
2017-05-23  3:34                       ` Shubham Bansal
2017-05-23  4:22                         ` Kees Cook
2017-05-23  5:03                           ` Shubham Bansal
2017-05-23  5:35                             ` Kees Cook
2017-05-23 18:39                               ` Shubham Bansal
2017-05-23 19:32                                 ` Kees Cook
2017-01-30 10:38 Shubham Bansal
2017-01-30 21:57 ` Kees Cook
     [not found]   ` <CAHgaXd+nj69n-Xf46N=4M-j-0hKHVrrLfsvRZCG=2CCAtVF6ZA@mail.gmail.com>
     [not found]     ` <CAGXu5j+NSLomuSgD40kys+pWc+J9aB6Bbk_gSP9Lp_ScimQn_w@mail.gmail.com>
2017-02-01 13:01       ` Shubham Bansal
     [not found]         ` <76621BFF-B30B-4417-AB2B-DB21CA6092D9@netronome.com>
2017-02-03  7:04           ` Shubham Bansal
2017-02-03  8:25             ` nick viljoen
2017-02-08  7:29         ` Shubham Bansal
2017-02-08 19:41         ` Kees Cook
2017-03-15 12:13           ` Shubham Bansal
2017-03-15 21:55             ` David Miller
2017-03-28 20:49               ` Shubham Bansal
2017-03-29  0:00                 ` Daniel Borkmann
2017-03-30 14:04                   ` Shubham Bansal
2017-04-06 11:05                     ` Shubham Bansal
2017-04-06 12:51                       ` Daniel Borkmann
2017-05-06 16:48                         ` Shubham Bansal
2017-05-06 18:38                           ` David Miller
2017-05-06 20:27                             ` Shubham Bansal
2017-05-06 22:17                               ` Shubham Bansal
2017-05-09 20:12                         ` Shubham Bansal
2017-05-09 20:19                           ` David Miller
2017-05-09 20:25                           ` Daniel Borkmann
  -- strict thread matches above, loose matches on Subject: below --
2017-01-30 10:16 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=8c53012b-cb81-5228-de79-f55457d1cf69@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=ast@fb.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=illusionist.neo@gmail.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mgherzan@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nschichan@freebox.fr \
    /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).