From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit Date: Wed, 29 Mar 2017 02:00:08 +0200 Message-ID: <58DAF908.8010404@iogearbox.net> References: <20170315.145512.1542025976162251828.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: David Miller , Kees Cook , Mircea Gherzan , Network Development , kernel-hardening@lists.openwall.com, linux-arm-kernel@lists.infradead.org, ast@fb.com To: Shubham Bansal Return-path: List-Post: List-Help: List-Unsubscribe: List-Subscribe: In-Reply-To: List-Id: netdev.vger.kernel.org Hi Shubham, On 03/28/2017 10:49 PM, Shubham Bansal wrote: [...] > Do you have any document to understand the working of tail calls? I > looked at your presentations but it seemed confusing to me. Anything > simple would be great, just about the tail calls. I don't think I need > examples, I can get them from your presentations. I just need a very > general idea. May be you know the code in kernel where it is > implemented. Sure, it's in __bpf_prog_run(), see the JMP_TAIL_CALL (kernel/bpf/core.c +1019). That's effectively what JITs implement. [1] page 3 has a high-level description as well, hope that helps. Thanks, Daniel [1] http://www.netdevconf.org/1.1/proceedings/papers/On-getting-tc-classifier-fully-programmable-with-cls-bpf.pdf From mboxrd@z Thu Jan 1 00:00:00 1970 From: daniel@iogearbox.net (Daniel Borkmann) Date: Wed, 29 Mar 2017 02:00:08 +0200 Subject: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit In-Reply-To: References: <20170315.145512.1542025976162251828.davem@davemloft.net> Message-ID: <58DAF908.8010404@iogearbox.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Shubham, On 03/28/2017 10:49 PM, Shubham Bansal wrote: [...] > Do you have any document to understand the working of tail calls? I > looked at your presentations but it seemed confusing to me. Anything > simple would be great, just about the tail calls. I don't think I need > examples, I can get them from your presentations. I just need a very > general idea. May be you know the code in kernel where it is > implemented. Sure, it's in __bpf_prog_run(), see the JMP_TAIL_CALL (kernel/bpf/core.c +1019). That's effectively what JITs implement. [1] page 3 has a high-level description as well, hope that helps. Thanks, Daniel [1] http://www.netdevconf.org/1.1/proceedings/papers/On-getting-tc-classifier-fully-programmable-with-cls-bpf.pdf From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <58DAF908.8010404@iogearbox.net> Date: Wed, 29 Mar 2017 02:00:08 +0200 From: Daniel Borkmann MIME-Version: 1.0 References: <20170315.145512.1542025976162251828.davem@davemloft.net> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [kernel-hardening] Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit To: Shubham Bansal Cc: David Miller , Kees Cook , Mircea Gherzan , Network Development , kernel-hardening@lists.openwall.com, linux-arm-kernel@lists.infradead.org, ast@fb.com List-ID: Hi Shubham, On 03/28/2017 10:49 PM, Shubham Bansal wrote: [...] > Do you have any document to understand the working of tail calls? I > looked at your presentations but it seemed confusing to me. Anything > simple would be great, just about the tail calls. I don't think I need > examples, I can get them from your presentations. I just need a very > general idea. May be you know the code in kernel where it is > implemented. Sure, it's in __bpf_prog_run(), see the JMP_TAIL_CALL (kernel/bpf/core.c +1019). That's effectively what JITs implement. [1] page 3 has a high-level description as well, hope that helps. Thanks, Daniel [1] http://www.netdevconf.org/1.1/proceedings/papers/On-getting-tc-classifier-fully-programmable-with-cls-bpf.pdf