Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752598AbdFUO0i (ORCPT ); Wed, 21 Jun 2017 10:26:38 -0400 Received: from mail-ot0-f173.google.com ([74.125.82.173]:36608 "EHLO mail-ot0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750999AbdFUO0g (ORCPT ); Wed, 21 Jun 2017 10:26:36 -0400 MIME-Version: 1.0 In-Reply-To: <59495367.3080402@iogearbox.net> References: <1495754003-21099-1-git-send-email-illusionist.neo@gmail.com> <593E6B0F.8070901@iogearbox.net> <59419D1E.2060303@iogearbox.net> <594813AA.5010001@iogearbox.net> <59495367.3080402@iogearbox.net> From: Shubham Bansal Date: Wed, 21 Jun 2017 19:56:34 +0530 Message-ID: Subject: Re: [PATCH v2] arm: eBPF JIT compiler To: Daniel Borkmann Cc: Kees Cook , Network Development , "David S. Miller" , Alexei Starovoitov , Russell King , "linux-arm-kernel@lists.infradead.org" , LKML , Andrew Lunn Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 857 Lines: 30 Hi Daniel, > > So my question would be, why can't the JIT imitate something > similar to what we do in the interpreter as well? So looking > at the disasm of what gcc compiles for the interpreter when it's > doing the above call could help as well in going forward. Not > sure if that answers your question, but perhaps not sure if I > understand your question yet? I just looked at the code again and I think I completely misunderstood the logic of BPF_JMP | BPF_CALL. I think each helper function is working like this. ____helper_function(u32 a1, u32 a2){ } helper_function(u64 a1, u64 a2){ ____helper_function((u32 *)a1, (u32 *)a2); } So ultimately, we call helper_function which takes u64 as arguments only. I know its asking a lot, but can you please confirm this asap? I would like to start implementing it. > > Cheers, > Daniel -Shubham