From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit Date: Sat, 06 May 2017 14:38:16 -0400 (EDT) Message-ID: <20170506.143816.2259768618578706384.davem@davemloft.net> References: <58E639E0.1010700@iogearbox.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: daniel@iogearbox.net, keescook@chromium.org, mgherzan@gmail.com, netdev@vger.kernel.org, kernel-hardening@lists.openwall.com, linux-arm-kernel@lists.infradead.org, ast@fb.com To: illusionist.neo@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:36622 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750721AbdEFSiY (ORCPT ); Sat, 6 May 2017 14:38:24 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: From: Shubham Bansal Date: Sat, 6 May 2017 22:18:16 +0530 > Hi Daniel, > > Thanks for the last reply about the testing of eBPF JIT. > > I have one issue though, I am not able to find what BPF_ABS and > BPF_IND instruction does exactly. They are not instructions, they are modifiers for the BPF_LD instruction which indicate an SKB load is to be performed. You never need to ask what a BPF instruction does, it is clear defined in the BPF interperter found in kernel/bpf/core.c Look for the case statement LD_ABS_W and friends in __bpf_prog_run(). From mboxrd@z Thu Jan 1 00:00:00 1970 From: davem@davemloft.net (David Miller) Date: Sat, 06 May 2017 14:38:16 -0400 (EDT) Subject: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit In-Reply-To: References: <58E639E0.1010700@iogearbox.net> Message-ID: <20170506.143816.2259768618578706384.davem@davemloft.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org From: Shubham Bansal Date: Sat, 6 May 2017 22:18:16 +0530 > Hi Daniel, > > Thanks for the last reply about the testing of eBPF JIT. > > I have one issue though, I am not able to find what BPF_ABS and > BPF_IND instruction does exactly. They are not instructions, they are modifiers for the BPF_LD instruction which indicate an SKB load is to be performed. You never need to ask what a BPF instruction does, it is clear defined in the BPF interperter found in kernel/bpf/core.c Look for the case statement LD_ABS_W and friends in __bpf_prog_run(). From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sat, 06 May 2017 14:38:16 -0400 (EDT) Message-Id: <20170506.143816.2259768618578706384.davem@davemloft.net> From: David Miller In-Reply-To: References: <58E639E0.1010700@iogearbox.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: [kernel-hardening] Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit To: illusionist.neo@gmail.com Cc: daniel@iogearbox.net, keescook@chromium.org, mgherzan@gmail.com, netdev@vger.kernel.org, kernel-hardening@lists.openwall.com, linux-arm-kernel@lists.infradead.org, ast@fb.com List-ID: From: Shubham Bansal Date: Sat, 6 May 2017 22:18:16 +0530 > Hi Daniel, > > Thanks for the last reply about the testing of eBPF JIT. > > I have one issue though, I am not able to find what BPF_ABS and > BPF_IND instruction does exactly. They are not instructions, they are modifiers for the BPF_LD instruction which indicate an SKB load is to be performed. You never need to ask what a BPF instruction does, it is clear defined in the BPF interperter found in kernel/bpf/core.c Look for the case statement LD_ABS_W and friends in __bpf_prog_run().