All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shubham Bansal <illusionist.neo@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Kees Cook <keescook@chromium.org>,
	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: Tue, 23 May 2017 09:04:40 +0530	[thread overview]
Message-ID: <CAHgaXdL2qReJF1Aw08k3C+OiC-3AOy3VeYmQ1Hs7vKcrfGQnvA@mail.gmail.com> (raw)
In-Reply-To: <8c53012b-cb81-5228-de79-f55457d1cf69@gmail.com>

Hi Florian,

>> 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.

I am using busybox to get the rootfs. Here is what I am doing :-

1. ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j4 (for kernel
build as well as busybox build)
2. qemu-system-arm -M vexpress-a9 -dtb
./linux/arch/arm/boot/dts/versatile-ab.dts -kernel ./linux/arch/a
rm/boot/zImage -append "root=/dev/mmcblk0 console=ttyAMA0" -sd
./a9rootfs.ext3 --nographic

Can you help me with running qemu for ARMv5 and ARMv6 ?

>> 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.
>
I would post them as soon as I test them on ARMv5 and ARMv6. If you
can help me with that, please let me know.

> Thanks
> --
> Florian

-Shubham

WARNING: multiple messages have this Message-ID (diff)
From: illusionist.neo@gmail.com (Shubham Bansal)
To: linux-arm-kernel@lists.infradead.org
Subject: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit
Date: Tue, 23 May 2017 09:04:40 +0530	[thread overview]
Message-ID: <CAHgaXdL2qReJF1Aw08k3C+OiC-3AOy3VeYmQ1Hs7vKcrfGQnvA@mail.gmail.com> (raw)
In-Reply-To: <8c53012b-cb81-5228-de79-f55457d1cf69@gmail.com>

Hi Florian,

>> 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.

I am using busybox to get the rootfs. Here is what I am doing :-

1. ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j4 (for kernel
build as well as busybox build)
2. qemu-system-arm -M vexpress-a9 -dtb
./linux/arch/arm/boot/dts/versatile-ab.dts -kernel ./linux/arch/a
rm/boot/zImage -append "root=/dev/mmcblk0 console=ttyAMA0" -sd
./a9rootfs.ext3 --nographic

Can you help me with running qemu for ARMv5 and ARMv6 ?

>> 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.
>
I would post them as soon as I test them on ARMv5 and ARMv6. If you
can help me with that, please let me know.

> Thanks
> --
> Florian

-Shubham

WARNING: multiple messages have this Message-ID (diff)
From: Shubham Bansal <illusionist.neo@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Kees Cook <keescook@chromium.org>,
	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: [kernel-hardening] Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit
Date: Tue, 23 May 2017 09:04:40 +0530	[thread overview]
Message-ID: <CAHgaXdL2qReJF1Aw08k3C+OiC-3AOy3VeYmQ1Hs7vKcrfGQnvA@mail.gmail.com> (raw)
In-Reply-To: <8c53012b-cb81-5228-de79-f55457d1cf69@gmail.com>

Hi Florian,

>> 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.

I am using busybox to get the rootfs. Here is what I am doing :-

1. ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j4 (for kernel
build as well as busybox build)
2. qemu-system-arm -M vexpress-a9 -dtb
./linux/arch/arm/boot/dts/versatile-ab.dts -kernel ./linux/arch/a
rm/boot/zImage -append "root=/dev/mmcblk0 console=ttyAMA0" -sd
./a9rootfs.ext3 --nographic

Can you help me with running qemu for ARMv5 and ARMv6 ?

>> 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.
>
I would post them as soon as I test them on ARMv5 and ARMv6. If you
can help me with that, please let me know.

> Thanks
> --
> Florian

-Shubham

  reply	other threads:[~2017-05-23  3:34 UTC|newest]

Thread overview: 99+ 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  9:32           ` [kernel-hardening] " Shubham Bansal
2017-05-11  9:32           ` Shubham Bansal
2017-05-11 15:30           ` Kees Cook
2017-05-11 15:30             ` [kernel-hardening] " Kees Cook
2017-05-11 15:30             ` Kees Cook
2017-05-13 21:38             ` Shubham Bansal
2017-05-13 21:38               ` [kernel-hardening] " Shubham Bansal
2017-05-13 21:38               ` Shubham Bansal
2017-05-15 17:44               ` Kees Cook
2017-05-15 17:44                 ` [kernel-hardening] " Kees Cook
2017-05-15 17:44                 ` Kees Cook
2017-05-15 19:55               ` Daniel Borkmann
2017-05-15 19:55                 ` [kernel-hardening] " Daniel Borkmann
2017-05-15 19:55                 ` Daniel Borkmann
2017-05-20 20:01                 ` Shubham Bansal
2017-05-20 20:01                   ` [kernel-hardening] " Shubham Bansal
2017-05-20 20:01                   ` Shubham Bansal
2017-05-22 13:01                   ` Daniel Borkmann
2017-05-22 13:01                     ` [kernel-hardening] " Daniel Borkmann
2017-05-22 13:01                     ` Daniel Borkmann
2017-05-22 17:04                     ` Shubham Bansal
2017-05-22 17:04                       ` [kernel-hardening] " Shubham Bansal
2017-05-22 17:04                       ` Shubham Bansal
2017-05-22 20:05                       ` Kees Cook
2017-05-22 20:05                         ` [kernel-hardening] " Kees Cook
2017-05-22 20:05                         ` Kees Cook
2017-05-23  2:58                         ` Shubham Bansal
2017-05-23  2:58                           ` [kernel-hardening] " Shubham Bansal
2017-05-23  2:58                           ` Shubham Bansal
2017-05-23  4:27                           ` Kees Cook
2017-05-23  4:27                             ` [kernel-hardening] " Kees Cook
2017-05-23  4:27                             ` Kees Cook
2017-05-22 18:58                   ` Kees Cook
2017-05-22 18:58                     ` [kernel-hardening] " Kees Cook
2017-05-22 18:58                     ` Kees Cook
2017-05-22 19:08                     ` Florian Fainelli
2017-05-22 19:08                       ` [kernel-hardening] " Florian Fainelli
2017-05-22 19:08                       ` Florian Fainelli
2017-05-23  3:34                       ` Shubham Bansal [this message]
2017-05-23  3:34                         ` [kernel-hardening] " Shubham Bansal
2017-05-23  3:34                         ` Shubham Bansal
2017-05-23  4:22                         ` Kees Cook
2017-05-23  4:22                           ` [kernel-hardening] " Kees Cook
2017-05-23  4:22                           ` Kees Cook
2017-05-23  5:03                           ` Shubham Bansal
2017-05-23  5:03                             ` [kernel-hardening] " Shubham Bansal
2017-05-23  5:03                             ` Shubham Bansal
2017-05-23  5:35                             ` Kees Cook
2017-05-23  5:35                               ` [kernel-hardening] " Kees Cook
2017-05-23  5:35                               ` Kees Cook
2017-05-23 18:39                               ` Shubham Bansal
2017-05-23 18:39                                 ` [kernel-hardening] " Shubham Bansal
2017-05-23 19:32                                 ` Kees Cook
2017-05-23 19:32                                   ` [kernel-hardening] " Kees Cook
2017-05-23 19:32                                   ` Kees Cook
2017-01-30 10:38 Shubham Bansal
2017-01-30 10:38 ` Shubham Bansal
2017-01-30 21:57 ` Kees Cook
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
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  7:04             ` Shubham Bansal
2017-02-03  8:25             ` nick viljoen
2017-02-03  8:25               ` nick viljoen
2017-02-08  7:29         ` Shubham Bansal
2017-02-08  7:29           ` Shubham Bansal
2017-02-08 19:41         ` Kees Cook
2017-02-08 19:41           ` Kees Cook
2017-03-15 12:13           ` Shubham Bansal
2017-03-15 12:13             ` Shubham Bansal
2017-03-15 21:55             ` David Miller
2017-03-15 21:55               ` David Miller
2017-03-28 20:49               ` Shubham Bansal
2017-03-28 20:49                 ` Shubham Bansal
2017-03-29  0:00                 ` Daniel Borkmann
2017-03-29  0:00                   ` Daniel Borkmann
2017-03-30 14:04                   ` Shubham Bansal
2017-03-30 14:04                     ` Shubham Bansal
2017-04-06 11:05                     ` Shubham Bansal
2017-04-06 11:05                       ` Shubham Bansal
2017-04-06 12:51                       ` Daniel Borkmann
2017-04-06 12:51                         ` Daniel Borkmann
2017-05-06 16:48                         ` Shubham Bansal
2017-05-06 16:48                           ` Shubham Bansal
2017-05-06 18:38                           ` David Miller
2017-05-06 18:38                             ` David Miller
2017-05-06 20:27                             ` Shubham Bansal
2017-05-06 20:27                               ` Shubham Bansal
2017-05-06 22:17                               ` Shubham Bansal
2017-05-06 22:17                                 ` Shubham Bansal
2017-05-09 20:12                         ` Shubham Bansal
2017-05-09 20:12                           ` Shubham Bansal
2017-05-09 20:19                           ` David Miller
2017-05-09 20:19                             ` David Miller
2017-05-09 20:25                           ` Daniel Borkmann
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=CAHgaXdL2qReJF1Aw08k3C+OiC-3AOy3VeYmQ1Hs7vKcrfGQnvA@mail.gmail.com \
    --to=illusionist.neo@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=ast@fb.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.